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
ChickenOrBeefChickenOrBeef 

How to pass related record ID into flow?

Hey everyone,

I'm pretty new to Visualforce. I'm trying to create a Visualforce page for an Opportunity List button, which calls a visual flow to create a new Opportunity. I need to pass in the AccountID, but when I tried doing like this...

User-added image 

<apex:param name="AccountID" value="{!Opportunity.AccountId}"/>

...AccountID doesn't get populated in the flow. I'm assuming that's because this Opportunity doesn't have an AccountID yet, but this Visualforce page is using the Opportunity controller, so I don't have access to the Account's fields. How do I grab that AccountID?

Thanks,
Greg