Cert++
Close

Create and delete records in Flow Builder

Key Takeaway

Changing a flow variable doesn't change any record, so a flow needs Create Records and Delete Records to add or remove records. Using a record collection variable to create or delete many records at once cuts the number of DML requests.

Create Records and Delete Records are data elements in Flow Builder that write changes to the Salesforce database. A flow variable is only a working copy of data. To get, create, update, or delete records, a flow uses data elements such as these two. Each element can work on one record or many, and how you configure it decides how records are found, how field values are set, and what happens when something fails.

Creating one record or many

A flow can create a record for any object you see in Object Manager, including standard and custom objects such as accounts, tasks, and opportunity products. Some API-only objects are also possible, but they tend to have greater requirements or downstream effects, so use care.

Create Records can create exactly one record or many records. To create many records, you must use a record collection variable that you populated earlier in the flow. To create one record, you either use all the values from a record variable or set the fields manually.

Setting fields manually works well when the data comes from several sources. You choose the object and give each field a value from separate variables, resources, or literal values.

For example, a record-triggered flow on Account can create a task. The flow sets the task's Assigned To ID to the triggering account's Owner ID, and it sets the task's Related To ID to the account's ID.

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. 757 members and growing.