Find your content:

Search form

You are here

How do I pass parameters to a Visual Workflow?

 
Share

I need to pass an ID as an input parameter to a visual workflow.

I could not find any documentation on how to do it.

Is it possible?


Attribution to: Srinivasu Julakanti

Possible Suggestion/Solution #1

I think Metadaddy has it correct but what has thrown me not to use for the longest time is that they never use it in a context that most people understand. Using the Lead Id example that Metadaddy gave reference to in the URL pass through while applying it as a apex:param you would write it like this:

<apex:page> <flow:interview name="MyFlow"> <apex:param name="vaLeadID" value="{!ID}" /> </flow:interview> </apex:page>

this will accomplish the same thing as the URL pass through. The only issue that comes with this is it has to be a button or link on the Master/Parent of the object that you are trying to create not within a button on the related list.


Attribution to: Craig Couture

Possible Suggestion/Solution #2

The short answer is Yes, absolutely. You can pass variables using the standard HTTP URL parameters. So from the lead page you can have a link to launch a flow and pass the leadID as the following nax.salesforce.com/flow/myLeadFlow?vaLeadID={!ID}

where vaLeadID is the unique name of the variable in flow.

If you are using a Visualforce Page with a flow embedded in it, you can pass the values using the tag in a VF page, something like this:

<apex:page>
  <flow:interview name="MyFlow">
    <apex:param name="var1" value="Value1"/>
  </flow:interview>
</apex:page>

Attribution to: Raja
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/1992

My Block Status

My Block Content