An administrator needs to update multiple Contact records associated with an Account using a Flow. To prevent exceeding Salesforce governor limits during execution, what is the recommended placement of the Update Records element when iterating through a collection of records?
- Outside of the Loop element, executing a single update on the modified record collection after the loop completesCevap
- BInside the Loop element immediately after assigning new values to each item in the collection
- CInside the Loop element prior to the Assignment element to verify existing field values
- DInside a Decision element within the loop body to conditionally commit changes for each record individually
Cevap
Place the Update Records element outside the Loop element, executing the DML update on the entire collection variable once after all assignments are complete.
Salesforce enforces strict governor limits on data manipulation language (DML) statements (150 per transaction). To ensure flows are bulkified, data manipulation elements like Update Records should always be placed outside the Loop element on the 'After Last Item' path. Records should be modified in memory via Assignment elements and stored in a collection variable before performing a single bulk DML update.
Adım Adım Çözüm
Anahtar Kavram
Flow Bulkification and Governor Limits
Tahmini Süre:1m 0s