We’ve screen flow that is called from a button from a record detail page. Now, we want to pass the recordId or entire record to flow so that we can get it without making any query.
STEPS TO PASS RECORD ID
The varaible “recordId” is a special resource in Salesforce Flows that automatically receives the value of the current record Id. For example, if you want to invoke the flow from an “Action” button on an object, there isn’t a way to pass any value to the Flow. In this case:
- Define a resource of “recordId” in the Flow as data type = Text and
- Mark that as “Available for input” is checked, Salesforce will automatically pass the record Id of the current record to this resource in the Flow.
STEPS TO PASS RECORD
Likewise create a variable with name “recordId” and put data type as “Record”. Also make sure that “Available for input” is checked.
Automatically, all fields of this record will be accessible using this variable.