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
EllenHEllenH 

Related Lists Not Showing on TabbedAccountView VF Page

I am new to VF and am wondering if anyone has come up against this issue...  I am looking to switch our views to using the Tabbed method.  It worked great with the sample code that I received from a course and did see on developer force.  I have two issues:

 

1.  How can you code the VF page to include the related list that is a custom object

2.  Even if it is not a tab, it will not display on the new view with the tabs.  Only the standard object do.  I checked the profiles to ensure they have the right modifications. 

 

I am stumped.  Thanks in advance for your collective knowledge.

 

 

Chamil MadusankaChamil Madusanka

Hi,

 

 This is an example for Account object's Tabbed view

 

<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"/>
      </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="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="NotesAndAttachments" />
      </apex:tab>
   </apex:tabPanel>
</apex:page>

 If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

 


EllenHEllenH

Hi Chamil,

 

Thanks so much for sending this sample code...  However, and pardon my inexperience, but I do not see in here where a custom object is listed...

 

I tried adapting this to one of the custom related lists, and can get the tab to display, but when I click on the tab, it does not do anything.  None of the fields are reflected..  very strange, but I am sure I may be missing somehting simple..

 

I used APEX Explorer to find the correct label name but I still cannot get the related list to display...

 

Your thoughts and feedback on this would be deeply appreciated.

Chamil MadusankaChamil Madusanka

Hi,

 

Related list with tabbed view is working fine with custom objects. Here is an example for custom object with tabbed view.

 

<apex:page standardController="Employee__c">
   <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="EmployeeTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab">   
      <apex:tab label="Details" name="AccDetails" id="tabdetails">
                <apex:detail inlineEdit="true" relatedList="false"  />                       
       </apex:tab>
      <apex:tab label="Notes and Attachments" name="Contacts" id="tabContact">
        <apex:relatedList title="" subject="{!Employee__c}" list="NotesAndAttachments" />    
      </apex:tab>
      <apex:tab label="Open Activities" name="Opportunities" id="tabOpp">
         <apex:relatedList title="" subject="{!Employee__c}" list="OpenActivities" />    
      </apex:tab>
      <apex:tab label="Employee Job Description" name="OpenActivities" id="tabOpenAct">
          <apex:relatedList title="" subject="{!Employee__c}" list="Employee_Job_Descriptions__r" /> 
      </apex:tab>
      <apex:tab label="Employee Job Description Competencies" name="Employee Job Description Competencies" id="tabNoteAtt">
        <apex:relatedList title="" subject="{!Employee__c}" list="Employee_Job_Decription_Competencies__r" /> 
      </apex:tab>

       
       </apex:tabPanel>
           
            
          
</apex:page>

 If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.