+ Start a Discussion
Lisa HorneLisa Horne 

Visualforce Related list on Account

I want to create a VF page on the Account that will display the related list of the HL Contracts records that have a look up to the Account.

I have the following but it gives me this error:  Content cannot be displayed: 'HLContracts__r' is not a valid child relationship name for entity Account

This is the code I have:

<apex:page standardController="Account">
<apex:relatedList list="HLContracts__r" />
</apex:page>


 
Best Answer chosen by Lisa Horne
AmulAmul
Hi Lisa,

please follow following steps

go  to the object Name :HL Contracts
Open Field Master Detail that you have created with 

Edit | Del  
Contract__c Master-Detail(Project) [Checked]   amul baranwal, 4/17/2014 12:19 AM

Edit this field

and you will see field label called 'Child Relationship Name'.

you have to use the same name while adding..Related List.

please let me know if you have question.




 

All Answers

AmulAmul
Hi Lisa,

please follow following steps

go  to the object Name :HL Contracts
Open Field Master Detail that you have created with 

Edit | Del  
Contract__c Master-Detail(Project) [Checked]   amul baranwal, 4/17/2014 12:19 AM

Edit this field

and you will see field label called 'Child Relationship Name'.

you have to use the same name while adding..Related List.

please let me know if you have question.




 
This was selected as the best answer
Lisa HorneLisa Horne
Thank you!  That worked !!!