You need to sign in to do that
Don't have an account?
Sarvesh Prajapati
getting error in vf as ''Reviews' is not a valid child relationship name for entity Review'
Getting error in vf as ''Reviews' is not a valid child relationship name for entity Review'.
Regards,
Mahesh
All Answers
Would you please provide litlle bit information about your object model and what do you want on vf page. It seems you are doing something wrong in understanding the relationship.
Thanks & Regards,
Naval
I have created Review and Job Application objects. I have defined a master detail relationship on Review object and relationship is named as 'Reviews' in which I have referenced Job Application.
<apex:page standardController="Review__c">
<apex:relatedList list="Reviews"/>
</apex:page>
Let me know where is problem.
Sarvesh.
Can you try this. I think you forgot to add __r after relationship name.
<apex:page standardController="Review__c">
<apex:relatedList list="Reviews__r"/>
</apex:page>
Let me know if you still need help.
Thanks,
Naval
Hi Sarvesh,
Please mark this as solved if it works for you.
Thanks,
Naval
Please check the below example:
Check the below relationship:
opportunity --> Account Name, you can find the Child Relationship Name:
Please let me know if it helps you.
Regards,
Mahesh
I tried using reviews__r also. But its not working.
Sarvesh.
I did same as per your example. But its not working.
Please suggest your views.
Sarvesh.
Please paste your full VF page along with Child Relationship here so that we can help you better.
Regards,
Mahesh
<apex:page standardController="Review__c">
<apex:relatedList list="Reviews"/>
</apex:page>
This is the only code I have. Please let me know if you need anything else.
http://C:\Sarvesh\salesforce\vf\relationship
I'm not sure if above link will for you about relationship. Please chek.
Sarvesh
Please upload the image by using the above button with the name "Image"
Regards,
Mahesh
Please see below.
Sarvesh
Please try below code:
Please do let me know if it helps you.
Regards,
Mahesh
If you are using custom objects then you have to find out child relationship name as Mahesh mentioned and add suffix '__r' just after the relationship name.
Let's say your child relationship name is "Reviews" then add suffix '__r' then it would be Reviews__r
When I'm putting below ID from Job Application in address bar, I'm getting same error again.
https://c.ap2.visual.force.com/apex/accountDisplay?id=a0428000009mmay
Sarvesh.
Regards,
Mahesh
It worked. Thanks a lot for your healp!
One more help please. I'm getting error as 'Unknown property 'String.First_Name__c' at the below line.
<apex:page standardController="Job_Application__c">
<apex:Pageblock title="My Job Application Details">
<apex:pageblocktable value="{!Job_Application__c.Candidate__c}" var="item">
<apex:column value="{!item.First_Name__c}"/>
</apex:pageblocktable>
</apex:Pageblock>
</apex:page>
Sarvesh
Regards,
Mahesh