You need to sign in to do that
Don't have an account?

How Do You Figure Out Related List Names
I'm recreating a detail page and I'm trying to add some related lists that are currently displayed on the existing page. I'm unable to figure out what the list names are supposed to be though. The names that are used in the pagelayout editor are not working. Some example list are "Notes & Attachments", "Approval History", and "Activity History". How do you find out the names to use in visual force for related lists?
To get this to work, you have to add the related list to the custom object's default page layout.
I stumbled onto this by accident when trying to get "NotesAndAttachments" to work for my object's custom view page (which, funny enough, is used to override the standard view page ... but it only works if the standard view page has the related list in its page layout).
So my page has this markup:
'NotesAndAttachments' is not a valid child relationship name for entity Email
However, once I add the "Notes and Attachments" related list to the default page layout, the above markup works.
This is on an EE-class development org (test edition, specifically).
All Answers
Thanks Andrew,
That was very usefull! I have been looking for this, but I didn't know where to look! :smileyvery-happy:
Regards
Jeroen
Hi Andrew,
When I tried using "CaseComments" as follows:
<apex:relatedList subject="{!$CurrentPage.parameters.id}" list="CaseComments" />
It does not works.
Please let me know your thoughts on this.
If the workaround is custom logic, then I am aware with it.
Also When I tried using "EmailMessages" as follows:
<apex:relatedList subject="{!$CurrentPage.parameters.id}" list="EmailMessages" />
It also does not works.:smileysad:
Is this the correct way to show email messages in related list.(except custom logic)
Thanks in advance,
Anand
Strange! In my WSDL CaseComments is a link to CaseComment and should be able to work, I remember I had simmilar problems with histories, this is how I solved it. Might work for you
<apex:pageBlockTable value="{!Case.Cascomments}" var="c">
<apex:column headerValue="Date" value="{!c.createddate}"/>
<apex:column headerValue="By" value="{!c.CreatedById}"/>
etc etc
</apex:column>
</apex:pageBlockTable>
I am not sure about the createddate syntax, but you get my drift, now you can create your own list.
Hope this will help you :smileyvery-happy:
Regards
Jeroen
Thanks Jereon,
So if I get the point, I can't set this straightforwardly and have to redevelop the related list with pageblock sections ?
Thanks for the help, will try this out
And yes, if you want to present this related data you need to recreate it by following the pattern jeroen describes above.
Thanks ! Actually I'm more interested in EmailMessages but it's the same bargain...
Any hint on when this is due to be fixed ?
Cheers,
Free
Our experiments seem to show that custom related lists work fine, but standard related lists don't work.
So this works:
Hope this is fixed soon :)
Message Edited by GlennAtAppirio on 09-18-2008 08:28 PM
Also applies to Approval History
Here's the idea to fill this gap: VOTE!
http://ideas.salesforce.com/article/show/10092627/Support_standard_related_lists_in_visualforce_components
Many of the standard related lists are available. Try the plural form as most use that terminology. For example:
HTML Email Status: "EmailStatuses"
Activity History: "ActivityHistories"
Notes and Attachments: "NotesAndAttachments"
Some do not correlate well to their title:
Approval History: "ProcessSteps"
Campaign History: "CampaignMembers"
To get this to work, you have to add the related list to the custom object's default page layout.
I stumbled onto this by accident when trying to get "NotesAndAttachments" to work for my object's custom view page (which, funny enough, is used to override the standard view page ... but it only works if the standard view page has the related list in its page layout).
So my page has this markup:
'NotesAndAttachments' is not a valid child relationship name for entity Email
However, once I add the "Notes and Attachments" related list to the default page layout, the above markup works.
This is on an EE-class development org (test edition, specifically).
Case Comment visual force related list (as a key word)
jeroen your post fixed my problem re-inventing the related list with vforce page and also add my custom logic.
Thank you
This has been broken for a year? And not fixed yet? Seriously?
Is there any way to find out if this is on the schedule to be addressed, or to get it bumped up in priority?
Rich C.