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
Winder OjedaWinder Ojeda 

How to add CaseComments, Attachments, Team Members and Histories as a list related to the RelatedList tag in a visualforce page for Case

As the question posed I would like to know how to add all these related lists on the case visualforce page. I have added others and they work perfect, but specifically with these (CaseComments, Attachments, Team Members and Histories ) gives the following error
'CaseComment' is not a valid child relationship name for entity Case
'Attachments' is not a valid child relationship name for entity Case
'TeamMembers' is not a valid child relationship name for entity Case
'Histories' is not a valid child relationship name for entity Case
Raj VakatiRaj Vakati
Its know issue . for TeamMember and CaseComment you need to create a custom code. please refer to this threads. 

for attachments and history here are the API names
<apex:relatedList list="Histories" />
    <apex:relatedList list="CombinedAttachments" />




https://salesforce.stackexchange.com/questions/32626/casecomment-and-casehistory-relatedlist-in-visualforce-page
http://www.iterativelogic.com/create-your-own-history-related-list-in-visualforce/
http://kandhakatla.blogspot.in/2012/01/case-history-related-list.html
https://salesforce.stackexchange.com/questions/32626/casecomment-and-casehistory-relatedlist-in-visualforce-page/32631#32631
https://success.salesforce.com/ideaView?id=08730000000Br5U
 
<apex:page standardController="Case" >
    <!--
        <apex:relatedList list="TeamMember" />
    <apex:relatedList list="CaseComments" />

-->   
    <apex:relatedList list="Histories" />
    <apex:relatedList list="CombinedAttachments" />

</apex:page>

 
Winder OjedaWinder Ojeda
Hi Raj V,

With the list of  <apex:relatedList list="CombinedAttachments" /> worked, but with    <apex:relatedList list="Histories" /> no. Give the following error

User-added image
Raj VakatiRaj Vakati
Make sure you have history tracking enabled on the case to use it ..
Winder OjedaWinder Ojeda
Hi Raj V
Yes, this is active