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
craigt_rcsecraigt_rcse 

Need Help Createing Account History Tab for Tabbed Account View

I've create a tabbed account view page in visualforce.  I'm able to create tabs for all of the related lists except for Account History.   I've tried using related entity history and account history but keep getting '....' is not a valid child relationship name for entity Account .

Can someone help me figure this out. 

 My code is below.  The red text is the problem area.

  

<apex:page standardController="Account" showHeader="true"
           tabStyle="account" >
   <apex:tabPanel switchType="client"
                  selectedTab="tabdetails"
                  id="AccountTabPanel">
      <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="Entitlements" name="Entitlement" id="tabEnt">
         <apex:relatedList subject="{!account}" list="entitlements" />
      </apex:tab>
      <apex:tab label="Cases" name="Cases" id="tabCase">
         <apex:relatedList subject="{!account}" list="cases" />
      </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" />
      </apex:tab>          
      <apex:tab label="Notes and Attachments" name="NotesAndAttachments" id="tabNoteAtt">
         <apex:relatedList subject="{!account}" list="NotesAndAttachments" />
      </apex:tab>
     
      <apex:tab label="Account History" name="AccountHistory" id="tabAcctHistory">
         <apex:relatedList subject="{!account}" list="AccountHistories"
/>
      </apex:tab>

 

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

Best Answer chosen by Admin (Salesforce Developers) 

All Answers

Ankit AroraAnkit Arora
This was selected as the best answer
craigt_rcsecraigt_rcse

Thanks Ankit.  This was exactly what I needed.

 

Ankit AroraAnkit Arora

Good to see that your problem is resolved :)

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page