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
james2000james2000 

relatedList problem

I'm having a problem displaying some related lists using the apex:relatedList tag.

For example, displaying the Activity History related list for a Case works fine:
Code:
<apex:page standardController="Case">
<apex:relatedList list="ActivityHistories" subject="{!case}"/>
</apex:page> 

 


But trying to display the related list for Case Comments does not - I get the error

'CaseComments' is not a valid child relationship name for entity Case

Code:
<apex:page standardController="Case">
<apex:relatedList list="CaseComments" subject="{!case}"/>
</apex:page>

 


This happens with other related lists for Case as well like Case History, Solutions, Case Contact Roles

Is this a bug or am I doing something wrong? I know I can build a section that emulates the related list but it doesn't have built-in support for paging AFAIK.


Message Edited by james2000 on 05-14-2008 04:38 PM
Ron HessRon Hess
you can do something like this to work around this known issue.

Code:
<apex:repeat var="someB" value="{!a.myRelatedBObjects}">
    {!someB.someField}
</apex:repeat>


get the name of the related objects from the WSDL

Message Edited by Ron Hess on 05-14-2008 02:55 PM
DS777DS777
This will the layout has to be re-drawn. How to just get the standard layout with all fields using related list where the related lists are not being identified
Ron HessRon Hess
are you looking for the  apex : detail component?
DS777DS777
Yes. Can you provide code for each of the related lists for Product using <apex:relatedlist>.
I keep getting error for Pricebookentry and standard price