1

I am using a custom button in classic to open the flow page with url /flow/runtime.apexp?flowDevName=Account_Handover&accountId={!Account.Id}

I need to get this accountId in my visual flow, so I have created accountId variable, if I don't enable the lightning skin from Process Automation Settings I get this account Id, but as soon as I enable the lightning skin in there (which I need to have in order to use custom lightning components in flow), I get the accountId as null.

Any suggestion/idea if I am missing something?

  • Do you have a flow variable named accountId? Make sure it's not set to private, and that the case is correct in the url – gorav Jun 21 '18 at 13:15
  • Your flow url looks odd to me. See the example here, there is no runtime.apexp, etc. trailhead.salesforce.com/en/projects/flow_calculate/steps/… – gorav Jun 21 '18 at 13:17
  • @gorav: when we enable lightning skin for flows in Setup > Process Automation Settings, the url changes to what I wrote! – Aditya Vijay Jun 21 '18 at 15:31
  • are you copying the url from running the flow? go to the flow page and you will see the url to copy and that should not change based on runtime. if your button is defined as you specify above, that is likely the issue. the solution posted below should resolve it. – gorav Jun 21 '18 at 15:34
5

Assuming your flow name is "Account_Handover", you should replace the custom button url with the following:

/flow/Account_Handover?accountId={!Account.Id}

Also, make sure that an "accountId" variable (text, input and output) exists in your flow so that it can be assigned to it, and you can use it later in your flow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.