Question

Difficulty: EasyFlow Resources and Data Manipulation

A Salesforce Administrator is building an autolaunched flow to update the status of multiple Account records. The flow iterates through a collection of records using a Loop element. What should the administrator do to perform the update while adhering to Salesforce governor limits and bulkification best practices?

  1. A
    Add an Update Records element inside the Loop element to immediately save changes for each Account record during each iteration.
  2. Assign modified values to record variables, add each variable to a record collection inside the loop, and place a single Update Records element outside the loop.Answer
  3. C
    Use an after-save record-triggered flow element inside the loop to automatically push updates to the database.
  4. D
    Place a Get Records element inside the loop to re-query each Account before updating it with a separate Update Records element inside the loop.

Answer

Assign modified values to record variables, add each variable to a record collection inside the loop, and place a single Update Records element outside the loop.
The correct option follows Salesforce flow bulkification standards: field updates are staged in memory and collected into a record collection variable during loop iteration, followed by a single Update Records element after the loop completes.

Step-by-Step Solution

1
Iterate over the collection using the Loop element
Each record in the collection is processed individually in memory.
Allows individual field modifications on current loop items without performing immediate database queries or commits.
2
Update field values and add modified record variables to a output collection variable using Assignment elements
All updated records are stored in a single collection variable in memory.
Accumulating changes in memory prevents executing DML statements repeatedly inside the loop.
3
Execute a single Update Records element referencing the output collection variable after the loop finishes
All modified records are committed to the database in a single bulkified DML operation.
Consumes only 1 DML statement against governor limits regardless of the number of items in the collection.

Key Concept

Bulkification of DML Operations in Flow Loops
Rate this question