+ Start a Discussion

VF Error - not a valid child relationship name for entity Cases__r

I am encountering a strange VF error. Well, not a strange VF error (I've seen it before), but this time I can't nail down the reason why it's appearing.


A bit of background:

-I have a custom object created for Projects that is in a master-detail relationship with Opportunities. Opportunities is the master, Projects is the child.

-I also have a lookup on the standard Cases object to the custom Projects object. The intention of this is to associate cases with projects, in addition to the account that SFDC associates by default.

-The Projects object default view is overridden with a VisualForce page. It uses the standard controller, but there are so many fields we opted for a tabbed layout. There are a number of related lists included at the bottom of the page (Cases being one of them) using apex:relatedlist.


<apex:relatedList list="Cases__r" />


This is working fine for our internal users. Everything shows up as it is supposed to.


Now I am trying to get it set up in the Partner Portal. When logging in as a Partner user, and trying to browse the same project record (uses the same VisualForce page), I get an error: 'Cases__r' is not a valid child relationship name for entity Project

Of course it's a valid child relationship name, because it already works for internal users. My first thoughts were:

- Check to make sure the related list is on the standard page layout, because VF has issues with related lists if it is not included on the standard page layout. Done.

- Remove the related list from the standard page layout and add it back in. Done.

- Check the Profile permissions to make sure the user should have access to the Objects. Done. Profile has Read, Create, and Edit access to Accounts, Contacts, Opportunities, Projects, and Cases.

- Make sure the Profile has access to the VisualForce page (not that this could really be the problem, since the error is referencing something on the page). Done.


Where else could this be coming from?




I am running into the exact same issue. Have you ever found a solution for this? Admin user can work without problems, a "normal" user gets the error.



Kind regards,



If I recall correctly, Field Level Security can cause this. If the user does not have access to the lookup field on the related object, I believe it causes this error when trying to display the related list on the VisualForce page.


Hi I am also having the same problem any update on this issue.

Missing the object permission.