INFO BELOW IS FOR VISUALFORCE but I need to override the Tab with a Lightning Component. Any idea how to do this?

Create a Visualforce page with the below code(same as yours but without a tabStyle for now).

<apex:page standardController="Account"> <apex:detail relatedList="true" title="true"/> </apex:page>

Then, go to Your Name | Setup | Create | Tabs. Under the Visualforce Tabs click New and name it as say Accounts and then select the Visualforce Page that we just created as the Content. Opt the style as say Orange CRT TV for the Orange color but do not add VF Accounts Tab to your header(where all tabs are there).

Now, back to the Visualforce page amend the code as below(notice the new tabStyle):

<apex:page standardController="Account" tabStyle="Accounts__tab"> <apex:detail relatedList="true" title="true"/> </apex:page>

Finally we have to override the View of the Standard Accounts object. Go to Your Name | Setup | Customize | Buttons & Links. Under the Standard Buttons & Links, click Edit close to the View action. Select Override With with Visualforce Page and then select our Visualforce page from that list. Click Save.

1 Answer 1


Firstly, your LWC or Aura should be implemented with force:hasRecordId interface to enable the component to be assigned the ID of the current record.

Now, navigate to Account under Object Manager and select Lightning Record Pages. You can create your Lightning record page, remove all the current components and you can add what you need to.

  • Thank you Jayesh. Do you have a resource or support article to explain how to do what you said here "your LWC or Aura should be implemented with force:hasRecordId interface". I'm not yet familiar with this. Do I need an additional tool besides Salesforce > Setup to accomplish this?
    – mels.c
    Commented Apr 14, 2022 at 16:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .