Sometimes you need to open more information or a custom report from a page layout. Placing a button on the page is a great way to open a Visualforce page with information about the open record.
See Salesforce Standard Controllers and Creating a VisualForce Page for more information on creating custom pages.
Create a button that links to a page:
- Have the page open you want to add the button to. Click the Setup (gear icon) and choose Edit Object. The Object Manager will open ready to make edits.
- Click on Button, Links, and Actions and then click on New Button or Link
- Give the button a label and name (e.g., Account Summary)
- Select the Display Type as Detail Page Button
- Select the Behavior as Display in new window
- Select the Content Source to be Visualforce Page and select the page from the list.
- Click the Save
Add the new button to the page:
- Click on Page Layouts and then the Mobile & Lightning Actions section of the layout
- Find the new button and drag to the Salesforce Mobile and Lightning Experience Actions area of the layout
- Click Save
- Go to an Account record and verify the button is visible. You may have to refresh your screen.
- Click the button to verify it is working.