Pass record into the Lightning Flow Builder
In this blog we are going to discuss how to pass in the record with all field values into the Lightning Flow Builder. From summer 20' release it is possible to pass the whole record instance into the lightning flow builder instead of just passing in the record id and this helps to avoid using “Get Records” element in the flow to query the fields.
Quick Action
- Create a flow with a variable of Data type “Record” instead of “Text”
- Select the object as whichever object the flow quick action is created on (in our example it is Account).
- Name the variable as “recordId”

In the example flow, I have created a screen element with binding the recordId variable with a couple of Account fields to check if we are receiving all record field values without using “Get Records” element.


Lightning App Builder Page
We will use the same flow created for the quick action on the App Builder page.
- When it comes to App Builder page there is no restriction on the naming of the variable.
- A variable of data type “record” is required to pass the record with all field values.
- Drag and drop the Flow element on app builder page and select the relevant flow to be displayed.
- Select “Pass all field values from the record into this flow variable” to send all the field values into the created variable

Below screenshot displays the value using the flow without using “Get Records” element.

Note
The option of passing in a record id instead of whole record is still available by creating the datatype as text instead of record in both Quick Actions and the Lightning App Builder Pages.
Useful Resource
Pass In the Record When Launching a Flow from a Lightning Page or a Quick Action