Cert++
Close

Update Records versus assigning $Record

Key Takeaway

In a before-save flow, use an Assignment element to set fields on $Record. Salesforce saves the change without an extra save. In an after-save flow, use an Update Records element, which needs an extra save.

In a record-triggered flow, Salesforce stores the record that started the flow in a special record variable called $Record. How you change that record depends on when the flow runs: before or after Salesforce saves the record. The timing also affects how fast the flow runs and what else it can do.

What $Record is

Salesforce creates and fills $Record automatically when a record-triggered flow runs. The variable holds all the field values from the triggering record, which is the record that started the flow. The flow can read, check and change those values.

In the resource menu, $Record appears as "Triggering {Record}", such as Triggering Account or Triggering Contact.

$Record is available only in record-triggered flows and schedule-triggered flows. Screen flows and autolaunched flows have no triggering record, so they use a Get Records element to find the records to work with.

Platform App Builder Study Guide

Checklist progress

0/340Learned

Create and configure flows using Flow Builder

0/23

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform App Builder studiers.