'OpportunityContactRoles' is not a Valid Relationship?

December 30th, 2008

This is an interesting feature in Salesforce.com. I deployed a fairly standard Visualforce page from one of our sandboxes to production and it began throwing the following error:

‘OpportunityContactRoles’ is not a valid child relationship name for entity Opportunity

I thought this was strange as it was working in sandbox and OpportunityContactRoles is a standard relationship. This should not throw an error.

We finally solved the problem by adding the related list to the STANDARD page layout for the recordtype and this fixed the Visualforce page. Go figure.

Categories: Salesforce

Leave a comment

Comments Feed3 Comments

  1. Thomas Petit

    I get the same error when I try to add a custom object to this code:
    http://wiki.developerforce.com/index.php/Tabbed_Accounts_in_30_seconds

    It’s a tabbed related list feature but it always throws the error ‘XXXX’ is not a valid child relationship name for entity Opportunity whenever I try to add a related list XXXX to the code

  2. Bruce Durling

    I tried this for CaseComments and it doesn’t seem to work. The only solution seems to be to create a pageBlockTable and format it myself.

  3. Mike Melnick

    Interesting post, we had this same problem a while back and solved it by setting list=”Opportunities” in the visualforce page.

Leave a comment

Feed

http://blog.jeffdouglas.com / 'OpportunityContactRoles' is not a Valid Relationship?

WordPress Appliance - Powered by TurnKey Linux