An administrator is building an autolaunched flow to update the Stage of all open Renewal Opportunities associated with an Account whenever the Account's service tier changes. To ensure the flow adheres to Salesforce governor limits and bulkification best practices, which two elements or design choices should the administrator include in the flow logic?
- An Assignment element inside the loop that adds each modified Opportunity record to a record collection variable.Cevap
- BAn Update Records element placed inside the loop to update each Opportunity record immediately after its stage is modified.
- A single Update Records element positioned outside and after the loop to update the record collection variable.Cevap
- DA Roll-Up Summary field calculation inside the loop to aggregate Opportunity values on the parent Account prior to updating.
Cevap
The administrator should use an Assignment element inside the loop to populate a record collection variable, and then execute a single Update Records element outside the loop to commit all updates in bulk.
Bulkifying flows requires keeping data manipulation (DML) elements out of loops. Correct flow design uses an Assignment element inside the loop to accumulate modified records into a record collection variable, followed by a single Update Records element placed outside the loop path to perform the update in a single bulk operation.
Adım Adım Çözüm
Anahtar Kavram
Bulkification in Flow Builder using Collection Variables and Assignment Elements