A Salesforce Administrator needs to design an autolaunched flow that processes multiple related Opportunity records associated with an Account. The business requirement demands updating specific field values across all related open opportunities while maintaining optimal performance and strictly adhering to Salesforce governor limits. Which TWO design practices should the administrator implement in Flow Builder?
- Use an Assignment element inside the loop to accumulate modified records into a collection variable, then place a single Update Records element outside the loop.Cevap
- Apply filter conditions in the Get Records element to retrieve only open Opportunities, minimizing the dataset before entering the loop.Cevap
- CPlace an Update Records element inside the loop to ensure each Opportunity record is saved immediately during every iteration.
- DCreate a Roll-Up Summary field on the Account object to dynamically loop through the child Opportunity collection without using a Get Records element.
Cevap
The administrator should accumulate updated records into a collection variable inside the loop and perform a single Update Records operation outside the loop, as well as pre-filter the Get Records element to only query open Opportunities.
To maintain optimal flow performance and comply with Salesforce governor limits, flows processing multiple records must be bulkified. Filtering query results in the Get Records element ensures that only target records enter the transaction. Accumulating field updates into a collection variable via Assignment elements during iteration allows the entire set to be updated in a single DML statement placed outside the loop.
Adım Adım Çözüm
Anahtar Kavram
Flow Bulkification and Governor Limit Prevention