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
Ashutosh Tripathi 9Ashutosh Tripathi 9 

How can I pass Contact and Opportunity related to account on the VF page.

Hi Everyone,

I have a situation here, I have created a link on the Account detail page that will navigate to a new VF page. I want to add contact and opportunity to be added on that page for the selected account.
I have created link and also can navigate it from account detail page to new VF page but how can I add contact and opporutnity to the selected account from that VF page.

Please advise!
William TranWilliam Tran
You can use <apex:relatedList list="Opportunities"/> to display those.

If you have more issues, please post your VF code/controller and describe what you want to do.

Thx.