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
Chris BettiniChris Bettini 

How do I show two levels of related lists with visualforce?

I know I can pass the Contact ID from the active page and show a related list, but having trouble figuring out how to show the related list one more level down. For the active contact I need to show the list of his clients and each clients investments.

Financial Advisor (Contact)
    Client list (master-detail to Contact)
         Client Investments (master-detail to Client)

Any help and insight is much appreciated! thanks!

 
Robert ZentgrafRobert Zentgraf
Hi Chris,

In my opinion, you can write an additional controller to receive the datas from Client Investments and then use <apex:table> or <apex:repeat> to show the result on the visualforce page.

Regards
Robert

(mindforce: http://www.mind-force.de)
Krishna SambarajuKrishna Sambaraju
You can create a visualforce component which can display the Client Investment records based on the Contact Id and add this component in the visualforce page.

Regards,
Krishna.