When customizing page layouts, you can control which standard and custom buttons appear, as well as the order in which they appear.
Available in: Salesforce Classic and Lightning Experience
Custom buttons and links are available in: All Editions
Visualforce pages and s-controls are available in: Contact Manager, Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions
User Permissions Needed
To create or change custom buttons or links:
Custom buttons display at the top and bottom of the detail page to the right of all standard buttons.
Custom buttons aren’t distinguished from standard buttons in any graphical way. However, you can recognize them by their location on the right of all standard buttons.
If the button bar gets too wide on the detail page layout, the browser displays a horizontal scroll bar. If the button bar gets too wide on the list view, search result, tagging result, or related list layouts, the buttons wrap.
Custom buttons are available for activities under the individual setup links for tasks and events. To add a custom button to an activity list view or search layout, first create a custom list button in tasks or events. Next, add it to your activity list view or search result layouts. You can override a button that applies to both tasks and events.
Person Account records use the custom buttons and links you have made for accounts.
If your organization uses the Console tab, list buttons are available in Mass Action. List buttons won’t display in the mini page layouts. Pages that display due to custom buttons and links display in the console without the header or sidebar.
If you get an error message when overriding a button that appears in a list, try calling the s-control using the URLFOR function.
When creating custom buttons, be aware of any validation rules your organization has for records on that object. For example, a custom list button that changes case status may conflict with a case validation rule. In this scenario, Salesforce displays the error message for the validation rule when users click the custom button.
To replace a standard button with a custom button, first define the custom button, then customize the page layout to hide the standard button and display the custom one in its place
Visualforce pages used as custom links on the home page can’t specify a controller.
Visualforce pages used as custom buttons or links on detail pages must specify a standard controller of the same object.
Visualforce pages used as custom list buttons must use a standard list controller of the same object.
To prevent a user from performing a particular action, such as creating or editing, change the user's permissions rather than hiding the standard button. Hiding a standard button removes it from a page layout but the link is still available and users can navigate to the new or edit page manually.
Don’t select Display Checkboxes (for Multi-Record Selection) for list buttons that link to a URL that doesn’t support post operations. Checkboxes display next to records in a list if you have selected Display Checkboxes (for Multi-Record Selection) for at least one list button in that list. However, selected records in this list are unaffected when clicking a custom list button that doesn’t have this option selected.
Custom buttons aren’t available for Web-to-Lead, Web-to-Case, the Case Teams related list, or the user object.