You need to sign in to do that
Don't have an account?
Smyta
How to display multilevel relationship objects in visualforce?
Hello,
I want to display child of a child for Account standard object. How to achieve this in Visualforce?
If I use standard controller "Account" it gives an error.
May be this is a very basic question but I am new to Visualforce.Thanks in Advance.
Smita
I want to display child of a child for Account standard object. How to achieve this in Visualforce?
If I use standard controller "Account" it gives an error.
May be this is a very basic question but I am new to Visualforce.Thanks in Advance.
Smita
Is there any namespace for the object.
If possible, can you paste the Object configuration and the relationship screens here.
Regards,
Mahesh
All Answers
Please paste your existing VF page so that it will easy to troubleshoot on it. Also explain more about what error you are getting.
Regards,
Mahesh
Following is the code snippet,
<apex:page standardController="Account">
<apex:detail relatedList="false"/>
<apex:relatedList list="Payments"/>
</apex:page>
Error is
'Payments' is not a valid child relationship name for entity Account
Actually my question is wrong.."Payment" is the direct child of "Account" object and the child relationship name 'Payments' is also correct.
Not sure what is wrong here.
Regards,
Smita
Below is the solution for your issue:
I also tested in my DE environment and below is the results.
Please do let me if it helps you.
Regards,
Mahesh
I have already tried that, it gives the same error :
'Payments__r' is not a valid child relationship name for entity Account
Here "Payment" is not any custom object but it has been installed from a package which was available to integrate with the other system.
Regards,
Smita
Is there any namespace for the object.
If possible, can you paste the Object configuration and the relationship screens here.
Regards,
Mahesh
Yes there is a namespace for the object lets say "abc" and 'Payment' object is realted to 'Account' via Lookup relationship.
I tried using
<apex:page standardController="Account">
<apex:detail relatedList="false"/>
<apex:relatedList list="abc__Payments__r"/>
</apex:page>
in visualforce but no luck.
Thanks for your help.
--Smita
Here I would like to know few things:
(1) How are you testing this VF page?
(2) If you are passing the Account Id, is it having Payment child records.
(3) When you are running the VF page, what error you are getting.
(4) If possible Pintscreens.
Regards,
Mahesh
Using namespace like below is working now I don't what was the issue when I tried before.
<apex:relatedList list="abc__Payments__r"/>
Thank you so much for all your help.
Regards,
Smita
Glad that your issue got resolved with name space :-)
Please martk it as resolved so that it will be helpful to others.
Regards,
Mahesh