Pass record into the Lightning Flow Builder

Ashwin Kumar Srinivasan
2 min readJul 31, 2020

--

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”
Create a new resource to receive the record from Quick Action

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.

Add a screen element to check if we receive the Account values in the variable created
Flow used without the “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
Select “Pass all field values from the record into this flow 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

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response