I want to add CaseComment and CaseHistory related list to my visualforce page.

<apex:relatedList list=" " />

What should be the value for List attribute in the code defined above. When I added

<apex:relatedList list="CaseHistory" /> 'Histories' is also not working

<apex:relatedList list="CaseComment" /> 'CaseComments' is also not working

I get errors saying they are not valid child relationship name for entity Case.

Please help me out on this issue.


I tried with this and works for me.

        <apex:pageBlockTable value="{!case.casecomments}"var="c">
            <apex:column value="{!c.commentbody}"/>
        <apex:pageBlockTable value="{!case.Histories}" var="c">
            <apex:column value="{!c.OldValue}"/>
            <apex:column value="{!c.NewValue}"/>

I suggets you create own history related list. You can refer this link

  • I can build it, but the reqmt is to build without using VF or apex. I need to use apex:relatedList Apr 14 '14 at 11:13

You can do this through custom controller. Please refer this link. Case History

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.