Salesforce - How to Add a Button in Salesforce Lightning



Guide

  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:

    1. Label: The text is displayed on the button.

    2. Display Type: Select and choose between a link or a button.

    3. Behaviour: Eg. Displaying in a new window

    4. 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.

🚀

Create your first interactive demo in minutes

No credit card required • Start building today

Start free

    This website uses cookies to enhance the user experience.

    AcceptDecline