function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
V100V100 

Displaying records from child of child Objects in pdf page.

I am looking to display child of a child records within a VF page using a standard controller.

<apex:repeat value="{!Parent__c.ChildofParent__r}" var="cl">  

This works fine to display the child records. What i then need to do is display the child records of that child.

I tried below within the above repeat.

<apex:repeat value="{!Parent__c.ChildofParent__r.ChildofChild__r}" var="c2">  

and then various version of this to try to display the records.

 

Is this possible without a custom controller and if so can anyone help with the syntax.

 

Best Answer chosen by Admin (Salesforce Developers) 
Vinita_SFDCVinita_SFDC

Hello,

 

This is not possible. You can traverse up to five levels of child-to-parent relationships. For example, if using the Contact standard controller,
you can use {!contact.Account.Owner.FirstName} (a three-level child-to-parent relationship) to return the name
of the owner of the account record that is associated with the contact.


• You can traverse one level of parent-to-child relationships. For example, if using the Account standard controller, you can
use {!account.Contacts} to return an array of all contacts associated with the account that is currently in context.

All Answers

Vinita_SFDCVinita_SFDC

Hello,

 

This is not possible. You can traverse up to five levels of child-to-parent relationships. For example, if using the Contact standard controller,
you can use {!contact.Account.Owner.FirstName} (a three-level child-to-parent relationship) to return the name
of the owner of the account record that is associated with the contact.


• You can traverse one level of parent-to-child relationships. For example, if using the Account standard controller, you can
use {!account.Contacts} to return an array of all contacts associated with the account that is currently in context.

This was selected as the best answer
V100V100

thanks Vinita, not the answer i wanted but it confirms what i thought.