function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matthew Covarrubias 2Matthew Covarrubias 2 

How do you pass a record id into a flow variable using utility bar in LEX?

I created a flow with a text input only variable that inserts the current account record ID because later in the process it updates fields on that account record. 

I know how to insert the value of this variable using a button with the following formula: /flow/Flow_Name?AccountID={!Account.Id}&retURL=%2F{!Account.Id} 

Now, instead of using a button, I want to launch this flow using Utility Bar in LEX. I do this by editing Sales Console under Lightning Experience App Manager and under the Utility Bar under Component Properties, there is the option to enter values for flow variables. This is where I can enter the variable I created in the flow (AccountID).
My question is- what do I enter so the Account ID that launches the flow is used? I’ve tried using: {!Record.Id}, {!Account.Id}, ?AccountID={!Account.Id}&retURL=%2F{!Account.Id}, and all sorts of other combinations. Does anyone know if it is possible to pass the record ID into the flow when launching a from the Utility Bar and how?
 
Side note: I know it is possible to pass the Record ID into the flow using a Lightning Component in Lightning Pages. There is a checkbox titled Pass record ID into this variable. So, it looks like it is possible to pass a record ID, but I want to do it from the Utility Bar and not from a Lightning Component in Lightning Pages.

Thank you
Best Answer chosen by Matthew Covarrubias 2
NagendraNagendra (Salesforce Developers) 
Hi Matthew,

This seems currently not possible.

Please also see this Question(https://salesforce.stackexchange.com/questions/156396/how-to-pass-current-record-context-in-a-utility-bar-lightning-component)

{!v.recordId} is not present in a Utility Bar Component even if you implement the force:hasRecordId interface(https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_interfaces_force_hasrecordid.htm?search_text=hasRecordId)

Please close this thread if it's resolved.

Thanks,
Nagendra

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Matthew,

This seems currently not possible.

Please also see this Question(https://salesforce.stackexchange.com/questions/156396/how-to-pass-current-record-context-in-a-utility-bar-lightning-component)

{!v.recordId} is not present in a Utility Bar Component even if you implement the force:hasRecordId interface(https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_interfaces_force_hasrecordid.htm?search_text=hasRecordId)

Please close this thread if it's resolved.

Thanks,
Nagendra
This was selected as the best answer
Matthew Covarrubias 2Matthew Covarrubias 2
Hi Nagendra, thank you for your response. 
Alex Edelstein 9Alex Edelstein 9
This now works. See:
https://salesforce.stackexchange.com/posts/194415/revisions
https://jenwlee.wordpress.com/2018/05/08/invoke-a-flow-from-a-global-action/
Chris Gibson - UDChris Gibson - UD
Just thought I would update this. You can simply put {Record.Id} and it will pass the record found in the URL for the page you are viewing. This is working for me on the utility bar currently.

User-added image
Byron 5Byron 5
Hi Chris, I tried passing {Record.Id} as the value for the recordId variable in my flow and I get the following error:
 An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information.


Any ideas what might be different for me?
Yachana YachanaYachana Yachana
Hi Chris, I am also facing the same issue. Please suggest .
An unhandled fault has occurred in this flow
An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information.