You need to sign in to do that
Don't have an account?

Account & Contact Hierarchy
Hi All,
I have a Requirement that i have to show account hierarchy in a VF page and its corresponding contacts in a hierarchy form like Accounts->Account1->Contact1,Contact2
Account2->Contact1,Contact2 like Role hierrachy means in a tree form but not finding exact solution that how can i get tree strcuture in a VF page of Accounts and Contacts.Could any one help me on this?
I have a Requirement that i have to show account hierarchy in a VF page and its corresponding contacts in a hierarchy form like Accounts->Account1->Contact1,Contact2
Account2->Contact1,Contact2 like Role hierrachy means in a tree form but not finding exact solution that how can i get tree strcuture in a VF page of Accounts and Contacts.Could any one help me on this?
there is no native way of doing in visualforce. Have to do with external tools. Two ways i know of
1. Using Jquery
http://teachmesalesforce.wordpress.com/2012/01/16/displaying-role-hierarchy-on-visualforce-page-tree-view/
2. Using Flex
http://blog.jeffdouglas.com/2008/12/08/flex-salesforcecom-tree-control/
Just explore the below mentioned Jquery to achieve this functionality:
http://ludo.cubicphuse.nl/jquery-treetable/
If you do not want to achieve this through Jquery, then use below mentioned code:
Just modify the code as per your need. You might need to adjust the CSS a little to achieve this desired look.