Skip to main content
Hi,

I can get related lists to show up just fine for normal objects, but I'm trying to do it with a custom object (in a master detail relationship) and it doesn't work.

It says "Tasting_Product__r" is not a valid relantionship.  I also tried "Tasting_Product__c"  but no luck.  What am I doing wrong?

Thanks,

<apex:page standardController="Tasting__c">

<apex:pageBlock title="Tasting Summary">

    <apex:pageBlockSection columns="1">

    Tasting Name: {!Tasting__c.Name & " "} <br/>

    Date of Tasting: {!Tasting__c.Date_of_Tasting__c} <br/>

    Account: {!Tasting__c.Account__r.Name} <br/>

    Account Owner: {!Tasting__c.Account__r.Owner.Name} <br/>

    

    

    <apex:relatedList List="TastingProduct__r"/>

    

    </apex:pageBlockSection>

</apex:pageBlock>   

</apex:page>

 
2 answers
  1. Jan 29, 2015, 2:43 AM
    You have to put the relationship name of the object. To find the relationshipName go to the child object and click the master detail relationship field(Tasting). Then include the relationshipName__r

     
0/9000