An administrator needs to build a Flow that updates a group of expired Asset records for a target Account and creates a single notification Task for the Account owner. To ensure the flow executes efficiently without exceeding Salesforce governor limits, in what sequential order should the administrator execute the Flow elements?
- 1Execute a Get Records element to retrieve all expired Asset records related to the Account ID into a record collection variable.
- 2Pass the retrieved Asset record collection into a Loop element to process each Asset individually.
- 3Use an Assignment element inside the loop to update the Asset status field and add the current loop item to a secondary record collection variable.
- 4Place an Update Records element outside the loop to perform a single bulk DML update on the secondary record collection variable.
- 5Place a Create Records element outside the loop to generate a single follow-up Task record for the Account owner.
Answer
The correct sequence begins with retrieving the expired Asset records via a Get Records element, passing the collection into a Loop element, updating field values and adding records to a bulk collection via an Assignment element inside the loop, performing a single Update Records DML operation on the collection outside the loop, and finally creating the summary Task record outside the loop.
The correct order follows Salesforce Flow design best practices for bulkification. Data retrieval (Get Records) must occur first. Next, the collection is passed into a Loop element. Inside the loop, an Assignment element modifies field values in memory and appends the modified item to an output collection variable without executing DML. After the loop completes, a single Update Records element bulk-updates all Asset records at once. Finally, a Create Records element generates the summary Task.
Step-by-Step Solution
Key Concept
Bulkification in Flow Builder: Avoiding DML and SOQL elements inside loops