enter image description hereI am using the following VF page for Lead related List VF page and it is not working

<apex:page standardController="Lead">
  <apex:relatedList list="Campaign History" />
  <apex:relatedList list="Opportunities" />
  <apex:relatedList list="Activity History" />
  <apex:relatedList list="Notes" />
  <apex:relatedList list="Open Activities" />
  • Can you define "not working"? What do you see? – Sebastian Kessel Mar 28 '16 at 22:21
  • /apex/CustomLayout?id=00*********** 'Campaign History' is not a valid child relationship name for entity Lead This is coming for all object related list – cloudy-ritz Mar 28 '16 at 22:23

The reason for this issue is that the relatedList is not named "Campaign Histories"


<apex:relatedList list="CampaignMembers"/>

apex:relatedList list= values have to be valid relationship names taken from the schema. The friendly name as shown to the user is confusingly only tangentially related to the real relationship name.

enter image description here

| improve this answer | |
  • Thanks :) How to take opportunity in related list as it is not working – cloudy-ritz Mar 28 '16 at 23:38
  • @cloudlover in your screen shot you do not have an Opportunity related list, also do not believe there to be one unless you created a custom relationship which then you would need to use the custom fields child relationship name. – Jenny B Mar 29 '16 at 1:06
  • @cloudlover - Opportunities would be the name of an OOB relationship from Lead to Opportunity. There is no such OOB relationship. If you have a custom relationship, it would most likely be named Opportunities__r but custom relationships between Lead and Opportunity are extremely rare as once the Lead is converted, it disappears from user view – cropredy Mar 29 '16 at 13:43

You have to use related list's reference names, not the titles. Here is 2 examples:

<apex:page standardController="Lead"> <apex:relatedList list="OpenActivities" /> <apex:relatedList list="ActivityHistories" /> </apex:page>

Unfortunately I don't know the names for other, and it doesn't look like you could have all listed, but there are also NotesAndAttachments, Histories, and CampaignMembers as @cropredy is pointing out in his answer.

| improve this answer | |

The issue could be related to this one from the knowledge article here:


This error occurs on a VisualForce page when a related list is being referenced but isn't available on the user's page. An example of this error would be

'OpenActivities' is not a valid child relationship name for entityOpportunity.

The problem can appear confusing when the related list is actually added to the page layout by the system administrator.


However the related list has been removed by the individual user (it doesn't appear only for the user receiving the error message). The related list can be added back in by going to:

Setup | My Personal Information | Change My Display | Customize My Pages | Select the (custom/standard object) from the list | Customize My Pages.

Add the related list that is referenced at the start of the error message into the selected list and click save. This should resolve the error message.

Note: Some child relationship names are not the plural of the object name like the following:
HTML Email Status: "EmailStatuses", Activity History: "ActivityHistories", Notes and Attachments: "NotesAndAttachments", Approval History: "ProcessSteps", Campaign History: "CampaignMembers".

| improve this answer | |

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.