Quick summary
Adding a custom button to a Salesforce page layout lets admins surface key actions — like external links or Apex logic — directly on object records such as Opportunity or Account. This guide walks through every step from Object Manager to dragging the button into the live layout.
Steps
- Navigate to Setup and go to Object Manager.
- Locate the specific object where you want to add the button (e.g., Account, Opportunity).
- Look for Buttons, Links, and Actions in the left pane.
- Click the New Button or Link button on the top right to create a new custom button.
- Define the button's properties: set the Label (text displayed on the button), choose a Display Type (link or button), configure the Behaviour (e.g., open in a new window), and specify the Content Source such as a URL or Apex code.
- Check for syntax errors while inputting your link and formula.
- Once configured, click Save to store the custom button.
- Navigate to Page Layout in the left pane.
- Click on the existing layout or create a new one using the top-right option.
- Select Buttons to see your newly created custom button.
- Click and hold the button, then drag it to the desired section of the page layout.
- Click Save to apply the changes to the page layout.
