To add a button onto a page layout in Salesforce, use the Salesforce Lightning App Builder.
Follow the below steps:
Log into Salesforce: Log into your Salesforce account with the necessary permissions (you must be a system administrator) to edit page layouts.
Navigate to the Object: Go to the object where you want to add a button. For example, if you want to add a button to a Contact page layout, navigate to the Contact Object.
From the menu, select "Page Layouts" and choose the proper layout (usually, this will be titled "Swantide [Object] Layout."
Enter Edit Mode for the Page Layout:
In Salesforce Classic: Click into the Page Layout you want to edit.
In Salesforce Lightning: Click on the gear icon (settings) in the top-right corner of your instance, and select "Edit Page."
Edit Page Layout in Salesforce Classic:
Edit Page Layout in Salesforce Lightning (note: you must complete BOTH steps 4 & 5):
In Salesforce Lightning, you will be taken to the Lightning App Builder.
In the App Builder, locate and select the section or area where you want to add the button.
Click the "Add Component" button in that section.
Search for and Add a Button:
In Salesforce Classic, after dragging the "Custom Button" element onto the page layout, you will be prompted to select an existing button or create a new one. Follow the prompts to select or create the button.
In Salesforce Lightning, use the search bar to search for "Mobile and Lighting Actions"
Drag the "Mobile and Lighting Actions" component onto the page layout.
In the properties panel on the right, select the desired button from the "Select an Action" dropdown or create a new action.
Configure Button Properties:
Depending on whether you're using a standard button or a custom button, you may have different configuration options. For custom buttons, you may need to specify the behavior and label of the button.
Save the Layout:
Once you've added and configured the button, be sure to save the page layout changes.
Activate the Page Layout:
Ensure that the updated page layout is activated. If it's not active, users won't see the button. In Salesforce Lightning, you may need to assign the page layout to specific profiles.
Test:
Go to a record of the object type for which you added the button and verify that the button appears and functions as expected.
That's it! You've successfully added a button to a page layout in Salesforce. Users with the appropriate permissions will now be able to see and use the button when viewing records of that object type.
Related Article(s):