Hi All,
I am writing this post because 2-3 clients came up with this same requirement, to show all the contacts of child Accounts in their parent Account.
I am explaining this requirement in detail with an example:-
Suppose there is Account "A" who is parent of Account "B".
now account "B" has 2 contacts "B1" and "B2".
client want to see this "B1" & "B2" contacts in parent account "A", so that he can easily know which contact associated with which account on same page easily.
And this is not only limited to 2 level it is goes to up to 100 level (we can't Query more then 100 in one context because of Governor limit).
I solved this problem by creating a VF page and add it to Detail page of Account, So now user can able to see all the contacts associated with the Account and their child Accounts in a same page.
Here the code:-
Screen Shots:-
Happy Coding...:)
Thanks
Anurag Jain