3. Use Case for customizing buttons:
Zylker is a manufacturing company. The Sales representatives initiate the process by creating new deals in the CRM for potential customers or business opportunities. So they are given the "create" permission. But in real time, there are high chances for an approved record to get cloned, which cannot be permitted. So, Zylker wants to disable the "Clone" button for users having a "Sales" profile.
As per their workflow, once the deal's stage is "Closed Won" a mail should be sent to the Manager and the customer. For this they have a custom button named "mail". But this mail button should not be sent when the deal is in other stages. To ensure this, Zylker wants to disable this button for all other stages of the deal.
Also, for better clarity, Zylker wants to rename the "save" button as "Create Deal" in the Create Page (Standard).
4. Solution:
As per the requirement, you need to create three Client Scripts.
A. Disable "Clone" button Detail Page (Standard) when the page loads
B. Disable "Mail" button Detail Page (Standard) when the stage changes
C. Rename button in Create Page (Standard)