I have a custom visual force page that is overriding the standard layout for salesforce campaigns. I´m adding all the related list for a campaign in visual force with these tags:

<apex:relatedList list="OpenActivities" />
<apex:relatedList list="ActivityHistories" />
<apex:relatedList list="Opportunities" /> 
<apex:relatedList list="Attachments" />

I´m not able to find the list name in order to show the Campaign Hierarchy section, i mean this one: enter image description here

Do you know which is the list name in order to show the above section ?

<apex:relatedList list="??" />

What you are after is

<apex:relatedList list="childCampaigns"/>

This will render the Campaign hierarchy related list exactly as requested.

This was determined using the Schema Describe library.

I span this up in a DE and tested it on a child and parent campaign for you.

Campaign Hierarchy

  • Thanks a lot Simon! Please could you tell me more about Schema Describe Library. I would like to know what is and how i can use it.
    – Enry
    Mar 30 '14 at 11:14
  • Sure, the Schema Describe stuff is very well documented, and a good start is here: salesforce.com/us/developer/docs/apexcode/Content/… basically it allows you to interrogate your data structure/metadata programmatically to retrieve field/label/list names etc.etc. very useful for working out API names, and dynamically referencing sObject fields/types. Mar 31 '14 at 8:30

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.