Sunday, 3 February 2013

Passing parameters or values to flow variables

We can pass parameters or values to flow variables.

For example i have a flow with opportunity details.Here i am navigating to this flow  from a custom detail page button on account.Here i want to pass Account Id to flow variable 'accountid' opportunity flow included in vf page.

Now construct a url  in our custom button as shown below

"/apex/pagename?accountid={!Account.Id}"

then the flow included in the vf page can get the value from 'accountid' parameter to 'accountid' variable inflow.

Here we should remember one thing.
Here both url parameter name and variable name in flow should be same.

5 comments:

  1. Can you pass multiple values via this method or one similar? I've been trying to push data from person accounts to a flow to auto populate some fields but am having no luck :(

    ReplyDelete
  2. Hi Daniel,

    You cannot auto populate values on flow elements.You can pass multiple values to flow variable you define in flow.

    ReplyDelete
  3. Hi Balaji - I wanted to confirm. So I have a task record that is populated with the due date, subject, priority, and status (subject, priority and status are picklist values). If a user has created the task record and input those fields in already, is there a way through Flow to provide the user the picklist values they already selected and give them a choice of modifying their selections? I don't think so, but just wanted your opinion. Thanks!

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Hi Danielle,
      It is not possible.

      Delete