How to Add a Button in Salesforce Lightning
Here's a comprehensive guide on adding a button in Salesforce Lightning:
- Go to Setup > Object Manager.
- Select an Object (Eg. Account, Opportunity) and locate the Buttons, Links, and Actions section in the left pane.
- Click the New Button or Link. Choose "Button" as the Display Type.
- Edit an Existing Button (Optional): If you already have a button, select it and click Edit.
- Configure the Button Details:
- Button Label: Enter a clear and concise label describing the button's function (e.g., "Submit for Approval," "Create Quote").
- Button Name: Provide a unique internal name for the button (alphanumeric characters and underscores).
- Content Source: Choose based on your button's action:some text
- Visualforce Page: If your button triggers a custom action defined in a Visualforce page, select this option and choose the relevant page from the dropdown menu.
- URL: If your button redirects users to a specific external URL, select this option and paste the URL in the designated field.
- Behavior: Define how the button opens the target (Visualforce page or URL):some text
- Same Window: Opens in the current browser window.
- New Window: Opens in a new browser window.
- Replace Content: Replace the current page content with the target content.
- Availability: Choose when the button should be visible to users:some text
- Available: Always visible.
- On Edit: Visible only when the record is in edit mode.
- On View: Visible only when the record is in view mode.
- Customize: Set more granular visibility conditions based on field values or other criteria.
- Add the Button to the Page Layout by heading over to the Page Layout in the left pane.
- Select “Buttons” to see your newly created custom button.
- Drag and drop the custom button you created (from the left pane) onto the desired location in the page layout.
- Save your changes.
This website uses cookies to ensure you get the best experience on our website. Learn More
Got it