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
jo devjo dev 

How to fetch All level records using parent-child relationship???

Hi,

(level1 is parent of level2)
[level1 only having relationship with level2….not with other objects]

(level2 is parent of level3)
[level2 only having relationship with level3….not with other objects]

(level3 is parent of level4)
[level3 only having relationship with level4….not with other objects]

(level4 is parent of level5)
[level4 only having relationship with level5….not with other objects]

(level5 is parent of level6)
[level5 only having relationship with level6….not with other objects]

I Want to dispaly records like below : In treeview structure 

Level1record
          level2record
                 level3record
                       level4record
                             level5record
                                   level6record

    
this is the only relationship between the objects…need to display all level records in tree view…
Ramu_SFDCRamu_SFDC
See if this article helps

http://www.infallibletechie.com/2012/11/tree-view-in-visualforce-page.html
jo devjo dev
hi Ramu,

Thank u for ur quick response...

I tried this ,but no idea how to get level3,level4,level5......facing problrm in for loop
Ramu_SFDCRamu_SFDC
See if this article helps to get into further levels http://forceguru.blogspot.in/2011/12/displaying-role-hierarchy-on.html
jo devjo dev
Again thank you for ur quick response...

the above link which u referred is not helping me....cant understand clearly.....Bcoz m having 6 different objects...which i alreay Described above...

i have tried lot of methods....Using wrapper class facing problem in for loop,In another method facing Too Many SOQL Quries error...


Ramu_SFDCRamu_SFDC
Hi Jo, I don't remember the site that I followed sometime back to create a tree structure for account hierarchy. I just came across another one at the link http://sfdcnuts.blogspot.in/2013/09/syntaxhighlighter.html

Sorry mate, currently I do not have any other suggestions other than this.