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

unable to display cases related list on custom visualforce page

I have to display Case as a related list to MyCustomObject.

Case has a lookup to MyCustomObject with child relation name as Cases


I have this line placed in my visualforce page 

 <apex:relatedList list="Cases__r"/> .


I don't get the error when I open the page as a system admin

but when I open it with different custom profile, it give me the error:


"'Cases__r' is not a valid child relationship name for entity MyCustomObject"

The custom profile in use  has "Modify all" permissions on cases

someone please help.

Best Answer chosen by Admin (Salesforce Developers) 

haaa...its fixed. Might be useful to other ppl. so here is the solution for it. Though it is the custom VF page thats displaying the related list. the standard page layout should and must have the related list displayed, only then the VF page displays the related list.