function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gopssalesforcegopssalesforce 

Hide/Show custom tabs

Hi to all

I am new to salesforce.

I have assigned a project where i have to show all of the related lists for the record type of the record that is passed in via the standard controller as  in Tab.So i have created a VF apge and added all the related list for all the record types.

I achieved this like shown below

 

<apex:tabPanel id="theTabPanel" >
        <!-- The details tab -->
        <apex:tab label="Details">
            <apex:detail subject="{!Account.Id}" relatedList="false" inlineEdit="true"/>
        </apex:tab>
        <!-- The Account Team Members related list tab -->
        <apex:tab label="Account Team" rendered="{!relatedAccTeamExist}">
            <apex:relatedList list="AccountTeamMembers"/>
        </apex:tab>
        <!-- The Activity History related list tab -->
        <apex:tab label="Activity History" >
            <apex:relatedList list="ActivityHistories"/>
        </apex:tab>

 Now my requirement is to show only those related lists which belongs to the account.

 

Can anyone help me please its urgent.

 

Thanks in advance


sfdcfoxsfdcfox

Use the subject attribute to show records for the named account (or if you're using a standardController attribute on the page, this should happen automatically). Example:

 

<apex:relatedList list="AccountTeamMembers" subject="{!Account}"/>