I have an Account VisualForce page that is tabbed. By using Record Types and Page Layouts I can have different fields visible for different record types. this however is not the case with the related lists. is there a way to show particular related lists for different record types within the visualforce page? i don't want to restrict the user from viewing the data completely.
i think i need to do some IF statement by not sure how to go about doing this.
Below is the markup:
<apex:page standardController="Account" showHeader="true"
tabStyle="account" >
<style>
.activeTab {background-color: #236FBD; color:white;
background-image:none}
.inactiveTab { background-color: lightgrey; 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" title="true" inlineEdit="true"/>
</apex:tab>
<apex:tab label="Contacts" name="Contacts" id="tabContact">
<apex:relatedList subject="{!account}" list="contacts" />
</apex:tab>
<apex:tab label="Opportunities" name="Opportunities"
id="tabOpp">
<apex:relatedList subject="{!account}"
list="opportunities" />
</apex:tab>
<apex:tab label="Inspections" name="Inspections"
id="tabInsp">
<apex:relatedList subject="{!account}"
list="Inspections__r" />
</apex:tab>
<apex:tab label="Hotel Status" name="Hotel Status"
id="tabHot">
<apex:relatedList subject="{!account}"
list="Hotel_Status__r" />
</apex:tab>
<apex:tab label="Open Activities" name="OpenActivities"
id="tabOpenAct">
<apex:relatedList subject="{!account}"
list="OpenActivities" />
</apex:tab>
<apex:tab label="Notes and Attachments"
name="NotesAndAttachments" id="tabNoteAtt">
<apex:relatedList subject="{!account}"
list="CombinedAttachments" />
</apex:tab>
</apex:tabPanel>
</apex:page>
Thanks in advance for everyone's help.