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?
- AAdd an Update Records element inside the Loop element to immediately save changes for each Account record during each iteration.
- 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.Cevap
- CUse an after-save record-triggered flow element inside the loop to automatically push updates to the database.
- DPlace a Get Records element inside the loop to re-query each Account before updating it with a separate Update Records element inside the loop.
Cevap
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.
Adım Adım Çözüm
Anahtar Kavram
Bulkification of DML Operations in Flow Loops