Salesforce CRM provides related lists on the standard pages which are added vertically to the lower section of the page below the detail section.
As more and more related lists are added for an object, the sections of related list data can make the page stretch vertically and make it a challenge for users to scroll down to the page to locate the required information as shown in the following screenshot:
To counter this, Salesforce provides hover links at the top of the page that allow the users to navigate via hyperlinks directly to the required related list selection further down the page. This is very useful when users are aware and dexterous enough to use its capabilities; however, some users experience navigating pages that have many related lists.
In this recipe, we will look at how you can show a Visualforce page to override the standard Account view and present the related list as separate tabs instead of having them rendered at the bottom of the page.
Carry out the following steps to create a Visualforce page:
AccountViewOverride
in the Label field.<apex:page standardController="Account" showHeader="true" tabStyle="Account"> <style>.activeTab {background-color: #236FBD; color:white; background-image:none}.inactiveTab { background-color: white; color:black; background-image:none} </style> <apex:tabPanel switchType="client" selectedTab="tabdetails" id="AccountTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab"> <apex:tab label="Details" name="AccDetails" id="tabdetails"> <apex:detail relatedList="false" relatedListHover="false" title="true" inlineEdit="false"/> </apex:tab> <apex:tab label="Available Opportunities" name="Available Opportunities" id="tabAvOpp"> <apex:relatedList subject="{!account}" list="AvailableOpportunities__r" /> </apex:tab> <apex:tab label="Contacts" name="Contacts" id="tabContact"> <apex:relatedList subject="{!account}" list="contacts" /> </apex:tab> <apex:tab label="Open Activities" name="OpenActivities" id="tabOpenAct"> <apex:relatedList subject="{!account}" list="OpenActivities" /> </apex:tab> <apex:tab label="Activity History" name="ActivityHistory" id="tabActHist" > <apex:relatedList subject="{!account}" list="ActivityHistories" pageSize="15" /> </apex:tab> <apex:tab label="Notes and Attachments" name="NotesAndAttachments" id="tabNews"> <apex:relatedList subject="{!account}" list="NotesAndAttachments" /> </apex:tab> </apex:tabPanel> </apex:page>
52.15.176.80