+ 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