A sales team is working on an opportunity to close a deal. But important customer details, such as Account Type, Industry, Phone, and Billing Address, are stored on the Account record.
Every time, the user has to open the Account in a new tab to check this information. To solve this, I display Account fields directly on the Opportunity record page.
Now the sales team can see customer details while working on the Opportunity, without leaving the page.
In this article, we will learn about how to display account fields on opportunity record page in Salesforce.
Display Account Fields on an Opportunity Record Page in Salesforce
To display account fields on an opportunity record page in Salesforce, we first need to create an object-specific action, then add the account action layout to the opportunity record page.
Create an Object Specific Action in Salesforce
To create an object-specific action in Lightning, go to the Setup Page of Salesforce Lightning and follow the steps below.
- On the Setup page, click the Object Manager tab, as shown in the picture below.

- In the Object Manager, we can see the list of objects. Now, select the object Account from the Label column.

- In the Account object, go to the left sidebar and, under the Details heading, click Buttons, Links, and Actions.

- In the Buttons, Links, and Actions window, we will create a new action by clicking the New Action button in the upper-right corner of the screen.

- In this step, we will enter the required details in the fields to create a New Action for the Account object.
- In the Action Type field, select the option Update a Record, and in the Label, write the appropriate label for the new action.
- For example, I have labeled it “Updated Accounts.” As we enter the Label, the Name field will auto-generate.
- In the Description field, enter the description for the new action.
- For example, I have added the description Displaying Account Fields on the Opportunity Record Page. After adding the description

- In this step, we can add some more fields to the new action. To add these fields, simply drag and drop them into the details section below.
- I have added the fields Annual Revenue and Billing Address to the new account action, Update Account Details.

When we click the Save button, the new action “Update Account details“ will be created, as shown in the picture below.

We have now created an action that displays the account fields on the Opportunity Record Page.
Add the Account Action Layout to the Opportunity record page
To add the action layout to the Opportunity record page in Lightning, go to the setup page of Salesforce Lightning and follow the steps below.
- On the Setup page of Salesforce Lightning, click on the Object Manager tab.

- In the Object Manager, scroll down and select the object Opportunity, or you can directly search for this object from the Quick Find box in this window.

- In the object, Opportunity, go to the left sidebar under the heading Details, and select Lightning Record Pages.
- When we click Lightning Record Pages, it opens the created record pages for opportunities. Here, select the record page to display account fields.
- In this case, I have selected the Lightning record page named Opportunity Record Page.

- In this step, click the Edit button in the Lightning Page Detail section.

- When we click the Edit button, the record page opens in the Lightning App builder. In the app builder, go to the left sidebar, and under the heading Components, we can see a list of Standard components.
- Select the component Related Record and drag it to the template region of the record page.

- When adding the Related Record component to the record page, it displays the message “Related record is invalid.”

- On the right-hand sidebar, enter the fields Header label, Lookup field, and Update Action. In the Header Label, enter the label or leave it blank to use the default text, then click the Edit Lookup Field button.

- When we click the Edit Lookup field button, a new window opens, and we can choose which lookup field to display in the related record component.
- In the First Lookup field, select Account Name, and in the Second Lookup, select Use this Account. After making these changes, click on the Done button.

- In the Update Action field, enter the name of the action you created earlier in the Accounts. In this case, I have entered the newly created action Update Account details and then clicked on the Save button.

- As we enter the fields Header label, Lookup field, and Update Action, we can see the Accounts are displayed on the Opportunity record page in the Related record component, as shown in the picture below.

Now we have successfully displayed the Account field on the Opportunity Record Page in Salesforce Lightning.
Conclusion
I hope you have got an idea about how to display account fields on an Opportunity Record Page in Salesforce Lightning.
To display the account field, we first created an Object Specific Action and then added the Account Action Layout to the Opportunity record page. By adding this account action to the standard component-related record, we successfully displayed account fields on an Opportunity Record Page.
You may like to read:
- Add a new Opportunity to Accounts in Salesforce
- Add a Pop-up message in the Salesforce Record Page
- Add Calendar to the Record Page in Salesforce Lightning
- Change Account Owners in Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.