0

I am trying to pass value from a visualforce page to a flow using

.

Document:https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_flows_setting_values.htm

However when referencing field values from the Account in my flow I get an error saying: The flow failed to access the value for Account.customfield__c because it hasn't been set or assigned.

My question is what all fields are passed from the visualforce page to the flow.

Do I need to define the individual fields in my flow under 'Assign the records's fields to variables to reference them in your flow' before using them.

1
  • The flow variable names are case sensitive, and the variables must not be set to private, as santanu indicates. They should at minimum be set to input only. If you are doing so, and it's not working, post the code for your vf page and controller.
    – gorav
    May 1, 2017 at 23:30

1 Answer 1

1

If you go through the documentation it says that, following variables can be passed through <apex:param> component:

  • sObject variables,
  • collection variables
  • sObject collection variables

You can set only variables that allow input access. For each flow variable, input access is controlled by:

  • The Input/Output Type variable field in the Cloud Flow Designer
  • The isInput field on FlowVariable in the Metadata API

So, define the input/output type variables in the flow and at the time of passing parameters from visualforce it should match with those input/output type variables.

2
  • Thank you @santanu . My main question is if we pass {!Lead} instead of {!Lead.ID}, what's the main difference between the two. Do I need to define the individual fields in my flow under 'Assign the records's fields to variables to reference them in your flow' before using them
    – force007
    May 2, 2017 at 9:31
  • To edit the previous comment, what is the main difference between passing {!Lead} instead of {!Lead.ID} in <apex:param>
    – force007
    May 2, 2017 at 9:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .