You need to sign in to do that
Don't have an account?
rfg
How to pass record ID to 'Launch Flow in Modal' component in Lightning community
I am trying to use the 'Launch Flow in Modal' component in a Lightning Community. I'm placing this button on a Contact record detail page in the Community, and I want to pass the Contact Id to the flow as the input variable 'recordId'.
The options for the component include a field called Flow Input Variables, and the 'info' tooltip for that field gives a syntax example for a JSON string to set the variable that looks like this:
I can't figure out how to get the record Id of the current contact from the contact detail page inserted into the flow.
First I tried
but that throws this error:
SyntaxError: JSON.parse: unexpected character at line 1 column 51 of the JSON data
I figured the brackets around the variable were the problem so I tried escaping them with backslashes:
but got the same error.
What's the right way to reference the Id of the current record from a community record detail page to pass to a flow?
The options for the component include a field called Flow Input Variables, and the 'info' tooltip for that field gives a syntax example for a JSON string to set the variable that looks like this:
I can't figure out how to get the record Id of the current contact from the contact detail page inserted into the flow.
First I tried
[{"name": "recordId", "type": "String", "value": {!Record.Id}}]
but that throws this error:
SyntaxError: JSON.parse: unexpected character at line 1 column 51 of the JSON data
I figured the brackets around the variable were the problem so I tried escaping them with backslashes:
[{"name": "recordId", "type": "String", "value": \{!Record.Id\}}]
but got the same error.
What's the right way to reference the Id of the current record from a community record detail page to pass to a flow?
Let me know if the steps in below articles help
https://developer.salesforce.com/forums/?id=906F0000000BR6AIAW
https://trailblazers.salesforce.com/answers?id=9063A000000ppdxQAA
Happy to answer follow up queries.Thanks
[{"name": "this is the name of Input Variable used in the flow", "type": "String", "value": {!record.Id}}]
fore the value please use record.Id - no Record.Id with upper case R - it helped me.
https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMYinUAH
https://salesforce.quip.com/AgKjAEz9UDfI
Correction:
[{"name": "this is the name of Input Variable used in the flow", "type": "String", "value": {!recordId}}]
[ { "name" : "var_inp_id", "type" : "String", "value": "_RECORDID_" } ]
var_inp_id is the input variable as is defined on the flow