An administrator is building an autolaunched flow designed to update the status of related entitlement records associated with an Asset object. The flow receives a record collection variable containing up to 150 related Asset Entitlement records. The administrator must set the Status field on each record to 'Expired' and update the database while adhering to Salesforce governor limits and automation best practices. What sequence of Flow elements should the administrator configure to achieve this requirement?
- Iterate through the collection with a Loop element, use an Assignment element inside the loop to update the Status field on the loop item variable, use a second Assignment element inside the loop to add the loop item variable to a new record collection variable, and place a single Update Records element after the loop specifying the new record collection variable.Answer
- BIterate through the collection with a Loop element, use an Assignment element inside the loop to set the Status field on the loop item variable, and place an Update Records element inside the loop to update each record individually during each iteration.
- CIterate through the collection with a Loop element, use a Get Records element inside the loop to retrieve each Asset Entitlement record by ID, update the Status field via an Assignment element, and execute an Update Records element after the loop completes.
- DPlace an Update Records element inside a Loop element configured to filter Asset Entitlement records matching the current loop item ID and update the Status field directly without using Assignment elements.
Answer
The correct approach is to iterate through the collection with a Loop element, update the field values on the current loop item using an Assignment element, append the modified loop item to a new record collection variable using a second Assignment element, and execute a single Update Records element after the loop completes.
The correct response describes the standard Salesforce bulkification pattern in Flow Builder. By updating record attributes using an Assignment element and adding modified items to an output collection variable within the loop, the flow avoids database calls inside iterations. Placing a single Update Records element after the loop updates all records in one DML call, ensuring scalability and adherence to governor limits.
Step-by-Step Solution
Key Concept
Flow Data Manipulation & Bulkification
Estimated Time:2m 0s