A Salesforce Administrator is building an autolaunched flow to process failed Equipment Audit records for a manufacturing facility. When an audit fails, the flow must retrieve all related child Audit Item records, set their status to 'Requires Re-inspection', and increment their internal inspection count by 1. The solution must handle high-volume updates efficiently without hitting transaction governor limits. Which Flow Builder design logic should the administrator implement?
- Execute a Get Records element outside the loop, iterate through the retrieved collection, update field values using an Assignment element to append modified records to a new collection variable, and execute a single Update Records element outside the loop.Answer
- BIterate through the retrieved collection using a Loop element, and place an Update Records element inside the loop to commit field changes immediately for each Audit Item record.
- CCreate a Roll-Up Summary field on the parent Equipment Audit object linked via a lookup relationship to automatically calculate and push the status change to child Audit Item records.
- DUse an Assignment element inside the loop to update the status field without assigning the updated picklist value to the Audit Item record type configuration.
Answer
Execute a Get Records element outside the loop, iterate through the retrieved collection, update field values using an Assignment element to append modified records to a new collection variable, and execute a single Update Records element outside the loop.
The correct approach enforces Salesforce bulkification design standards. Using a Get Records element before the loop fetches all necessary records in a single query. Modifying field values with Assignment elements within the loop operates strictly in-memory. Appending updated items to a new record collection variable allows a single Update Records element placed after the loop to perform a bulk DML update, staying well within governor limits.
Step-by-Step Solution
Key Concept
Flow Bulkification and Logic Elements