Override an Existing Page with a Visualforce Page
Replace an existing page, such as a standard record detail page, with a Visualforce page that uses custom tabs to organize the record information into sections.
-
Create a Visualforce page called
TabbedAccount.-
The
<style>tag is an HTML element, not a Visualforce component. It defines the CSS classes for two types of tabs:activeTabandinactiveTab. -
The
<apex:tabPanel>component generates tabs.- Its
tabClassattribute specifies the CSS class used when a tab is active. - Its
inactiveTabClassattribute specifies the CSS class used when a tab is inactive.
- Its
-
Each child
<apex:tab>component within the<apex:tabPanel>component represents a tab with different information about the account.- The first tab uses the
<apex:detail>tag to show the account’s details. - The other tabs use the
<apex:relatedList>tag to show lists of records related to the account.
- The first tab uses the
-
-
To preview the
TabbedAccountpage, specify the ID of a particular account in the URL, for example, https://MyDomain_login_URL/apex/TabbedAccount?id=001D000000IRt53. -
Override the standard Account detail page with the
TabbedAccountpage.-
From the object management settings for accounts, click Buttons, Links, and Actions.
-
From the list, find View, which represents the detail page of an account record. To override this page, click Edit from the dropdown menu.
-
In the Salesforce Classic Override section, select Visualforce page as the override type, and then select TabbedAccount from the dropdown menu.
-
To apply the TabbedAccount page in Lightning Experience or the Salesforce mobile app, select Use the Salesforce Classic override.
-
Save your changes.
-
-
On the Accounts tab, select any account record. The record detail page is now
TabbedAccount.
See Also