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

Account hierarchy

I have a requirement that I need to create a VF page with list of accounts and contacts with account hierarchy.. 
So, when I query an account, i need to check whether this has child account or not, if it has child account , we need to dig further to check any child accounts. Need to retirve the contacts for the lower most and should display all accounts and contacts in hierarchy model.. 

Hello Dinesh,

There are tons of examples regarding account hierarchy views via Visualforce page on the web, Please see the below post. It might help you get started.

Thank you
Dinesh - Check this following post which helps you to building hierarchy view in visualforce page

Account Hierarchy Tree By Using Visualforce Pages -
Show Hierarchy in visualforce page - http://