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
Rajesh Cool DevRajesh Cool Dev 

Display tree structure of custom objects in vf page


Can anybody help/suggest/provide solution on the below requirement,

I have 7 custom objects, Object1 is the Parent Object of all other 6 objects and each object has a lookup relation to its parent object (i.e. Object1 has a child Object2 , Object2 has a child Object3 and Object3 has a child Object4 so on...).

I want to display these custom objects in tree view in a VF page and is it possible to write SOQL query for 7 levels deeper to fetch the records of each object and display the related records under each object in the same tree view.


Any help highly appreciated.

Thanks in Advance.
@rajesh were you able to achieve. I am looking for same and couldn't figure a way out. please suggest if you have found any answers