# Salesforce - How to Add a Button in Salesforce Lightning

> To add a button in Salesforce Lightning, navigate to Setup and Object Manager, select the desired object, and create a new custom button under Buttons, Links, and Actions. Define its properties, save it, and then use the Page Layout section to drag the newly created button onto the layout before saving the final changes.

Canonical: https://livedemo.ai/tutorials/how-to-add-a-button-in-salesforce-lightning/
Apps: Salesforce
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a00d6243f01ed60a4e6c0/preview?step=1

## Steps

1. Navigate to Setup and go to Object Manager .
2. Locate the specific object where you want to add the button (e.g., Account, Opportunity).
3. Look for the Buttons, Links, and Actions in the left pane.
4. Click the New Button or Link button on the top right to create a new custom button.
5. Define the button's properties like: Label : The text is displayed on the button. Display Type : Select and choose between a link or a button. Behaviour : Eg. Displaying in a new window Content Source : Depending on the action type, you may need to specify content, such as the URL to navigate to or the Apex code to execute.
6. You can check for syntax errors while inputing your link and formula as well.
7. Once you've configured the button, click Save .
8. Now, head over to the Page Layout in the left pane.
9. Click on the existing layout or create a new one (top right)
10. Select Buttons to see your newly created custom button.
11. Click and hold the button
12. Then drag it to the desired section of the page layout.
13. Click Save to apply the changes to the page layout.
