Universal Containers requires a Screen Flow that allows customer support representatives to select multiple active Asset records associated with an Account and update their Warranty Expiration Date to a newly selected date. The flow must process up to 200 Asset records in a single execution without breaching Salesforce governor limits. What should the administrator configure in Flow Builder to fulfill this requirement?
- Iterate through the selected Asset collection using a Loop element, update the Warranty Expiration Date on the loop record using an Assignment element, append the loop record to a new Asset record collection variable, and execute a single Update Records element after the loop finishes using the new collection variable.Answer
- BIterate through the selected Asset collection using a Loop element, update the Warranty Expiration Date field using an Assignment element, and place an Update Records element inside the loop to commit each Asset update individually.
- CPlace a Get Records element inside a Loop element to fetch each Asset individually by ID, update the Warranty Expiration Date on the retrieved record, and invoke an Update Records element inside the loop.
- DIterate through the selected Asset collection using a Loop element, and use an Update Records element inside the loop configured to filter for all Asset records matching the Account ID.
Answer
The administrator should iterate through the Asset collection, update field values on the loop item using an Assignment element, add each updated record item to a secondary record collection variable inside the loop, and place a single Update Records element outside the loop referencing the secondary record collection.
The correct approach bulkifies database operations by modifying record field values in memory during loop execution, populating a new collection variable, and issuing a single Update Records DML call after loop iteration finishes.
Step-by-Step Solution
Key Concept
Flow Bulkification and Data Manipulation Best Practices
Estimated Time:2m 0s