+ Start a Discussion
DineshGuptaDineshGupta 

Account hierarchy

Hi, 
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.. 

logontokartiklogontokartik
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.

https://developer.salesforce.com/forums/?id=906F0000000AVvzIAG

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

Account Hierarchy Tree By Using Visualforce Pages - http://forcecapitalinfo.blogspot.in/2014/01/account-hierarchy-tree-by-using.html
Show Hierarchy in visualforce page - http://http://forceschool.blogspot.in/2011/06/show-hierarchy-in-visualforce-page.html