How to pass your current RecordID in your screen flow
How to do it from a Lightning Page or a Quick Action
Overview
For every automation you build using Flow Builder, you must modify and update records at some point. Creating a record ID variable in Flow Builder allows you to reference, manipulate, and transfer specific Salesforce records between flow elements, streamlining your flow's functionality and navigation.
Here is a quick walkthrough about how to pass your current RecordID in your screen flow.
Steps
For App Builder
The steps to pass the RecordID are as follows:
1. Create the flow Variable
First, you must create a flow variable to store the RecordID value. Make sure to make the flow variable is available for input
.
Open the Flow Builder Toolbox
Click on the "
New Resource
" buttonSelect "
Variable
" as a resource typeEnter an API Name
Select the appropriate object to which you'd like to pass this RecordID to.
Check the "
Available for Input
" checkboxClick "Done"
2. Check the RecordID option from the app builder page
Drag and drop the Flow element on the 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.
Problems?
If you don't see the RecordID checkbox in App Builder, please make sure to complete Step 1 first.
For Quick Actions
To pass a record ID to a Flow in a Quick Action, follow these detailed steps:
Create the record ID variable
Create a record ID variable in the Flow:
Open your Flow in Flow Builder.
Click the "Manager" tab on the left panel.
Click "New Resource" and select "Variable."
Enter a name (e.g., "recordId") and set the Data Type to "Text."
Check the "Available for Input" checkbox to make it an input variable.
Click "Done."
Create a Get Records collection
I use the recordId variable in my Get Records element to search for specific records associated with the object I started from.
You're done!
Last updated