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
Julie LeszczynskiJulie Leszczynski 

Activity History' is not a valid child relationship name for entity Account

I am trying to create a Tabbed Account page and keeping getting the following Error:
Activity History' is not a valid child relationship name for entity Account 
I have tried several of the recommendations given but nothing is working. Can you please review my code:
<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="Open Activities" name="OpenActivities"
                id="tabOpenAct">
         <apex:relatedList subject="{!account}"
                           list="OpenActivities" />
      </apex:tab>
      <apex:tab label="Activity History"
                name="ActivityHistory" id="tabActiHis">
         <apex:relatedList subject="{!account}"
                           list="Activity History" />
       </apex:tab>
       <apex:tab label="Contracts"
                name="Contract" id="tabContract">
         <apex:relatedList subject="{!account}"
                           list="Contracts" />
      </apex:tab>
      <apex:tab label="Opportunities" name="Opportunities"
                id="tabOpp">
         <apex:relatedList subject="{!account}"
                           list="opportunities" />
      </apex:tab>
       <apex:tab label="Cases" name="Case" 
       id="tabCases">
         <apex:relatedList subject="{!account}"
                           list="Cases" /> 
     </apex:tab> 
     <apex:tab label="Underwriting & Service" name="Underwriting_Service" 
     id="tabUndeSer">
         <apex:relatedList subject="{!account}"
                           list="Underwriting_Service" />
       </apex:tab>
       <apex:tab label="Notes and Attachments" name="NotesAndAttachments" 
       id="tabNoteAtt">
         <apex:relatedList subject="{!account}"
                           list="CombinedAttachments" />
      </apex:tab>
   </apex:tabPanel>
</apex:page>
Thank You - Julie
Deepak GulianDeepak Gulian
Try this!
<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="Open Activities" name="OpenActivities"
                id="tabOpenAct">
         <apex:relatedList subject="{!account}"
                           list="OpenActivities" />
      </apex:tab>
      <apex:tab label="Activity History"
                name="ActivityHistory" id="tabActiHis">
         <apex:relatedList subject="{!account}"
                           list="ActivityHistories" />
       </apex:tab>
       <apex:tab label="Contracts"
                name="Contract" id="tabContract">
         <apex:relatedList subject="{!account}"
                           list="Contracts" />
      </apex:tab>
      <apex:tab label="Opportunities" name="Opportunities"
                id="tabOpp">
         <apex:relatedList subject="{!account}"
                           list="opportunities" />
      </apex:tab>
       <apex:tab label="Cases" name="Case" 
       id="tabCases">
         <apex:relatedList subject="{!account}"
                           list="Cases" /> 
     </apex:tab> 
     <apex:tab label="Underwriting & Service" name="Underwriting_Service" 
     id="tabUndeSer">
         <apex:relatedList subject="{!account}"
                           list="Underwriting_Service" />
       </apex:tab>
       <apex:tab label="Notes and Attachments" name="NotesAndAttachments" 
       id="tabNoteAtt">
         <apex:relatedList subject="{!account}"
                           list="CombinedAttachments" />
      </apex:tab>
   </apex:tabPanel>
</apex:page>
Julie LeszczynskiJulie Leszczynski
Thank You that worked - but now I am having the same issue with my custom object Underwriting_Service. This object lets users create open issues about the account that are not case related. I tried several variations for the list= but nothing is working. Thanks
Deepak GulianDeepak Gulian

You need to go to the  Underwriting_Service and find the Account Lookup Field "Child Relationship Name" use that Name in
list="Child Relationship Name" like I'm highlighting in the screenshot and let me know if it works for you.

User-added image

 

Julie LeszczynskiJulie Leszczynski
Hi - unfortunately that did not work either - below is the screen shot from the page:
User-added image
Deepak GulianDeepak Gulian
<apex:tab label="Underwriting & Service" name="Underwriting_Service" id="tabUndeSer">
         <apex:relatedList subject="{!account}"   list="Services__r" />
</apex:tab>
This is the exact way to call the child relationship name.
Julie LeszczynskiJulie Leszczynski
THAT WORKED - YOU ROCK! 
Thanks So Much