Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Screen flow or record-triggered flow: recordId vs $Record

Screen flow or record-triggered flow: which one fits the job, why {!$Record} does not work in a screen flow, and how to use recordId instead.

You copied {!$Record.Name} from a record-triggered flow into a screen flow, and it is not there. The two flow types get their record in different ways. This page helps you pick the right type for the job, then moves {!$Record} logic into a screen flow.

Salesforce New Automation dialog opened from New Flow, showing Screen Flow and Record-Triggered Flow side by side, the two ways a flow gets its record
Two flow types, two ways to get the record.

Which one fits the job

Screen flow
Record-triggered flow

Starts when

A user opens it: on a record page, from a Quick Action, a button

A record is created, updated or deleted

Shows screens to the user

Yes

No, it runs in the background

Gets the record as

The recordId input variable: the Id only

{!$Record}: the whole record, every field

Avonni Flow Screen Components

Yes, on its screens

No, there are no screens

Example

An agent opens an Account and logs a visit

A Case's priority is set to High when its type is Outage

Pick the screen flow when a person has to see, choose or type something. Pick the record-triggered flow when the work must happen every time a record is saved, whoever saves it.

Why {!$Record} does not work in a screen flow

{!$Record} is the record whose change started a triggered flow. A screen flow is started by a person, not by a record change, so there is no $Record to read. The record comes in through recordId, and only as an Id. To read its fields, load the record with Get Records.

Steps

1

Add the recordId variable

Create a Text variable recordId with Available for input checked, and pass it from the page or a Quick Action. See How to pass your current RecordID in your screen flow.

2

Load the record

Add a Get Records element at the start, named Get_Record: the object of the page, filter Id Equals {!recordId}, Only the first record.

3

Replace each {!$Record} reference

Wherever the record-triggered version used {!$Record.Name}, use {!Get_Record.Name}. Same for every field.

4

Save and test

Debug the flow with a real record Id: the screens show that record's fields. See Test a screen flow that needs a record Id.

Do you need both?

Often, yes. The screen flow collects what the user decides and saves it with Update Records. That save is a record change, so any record-triggered flow on the object runs after it, as for any other edit. Keep the user's choices in the screen flow and the always-on rules in the record-triggered flow.

Was this helpful?