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?

4
  • 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
    Commented Jun 21, 2018 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
    Commented Jun 21, 2018 at 13:17
  • @gorav: when we enable lightning skin for flows in Setup > Process Automation Settings, the url changes to what I wrote! Commented Jun 21, 2018 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
    Commented Jun 21, 2018 at 15:34

2 Answers 2

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.

0

Another way is to create a text variable in the flow called:

recordId

Note: The capitalization has to be exact. RecordId or RecordID will not work! Check the box to make the variable available for input, then use this new variable in your record lookup.

Id = {!recordId}

You must log in to answer this question.

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