Universal Containers requires an automated process that updates all open Case records associated with an Account whenever an Opportunity for that Account is set to 'Closed Won'. Which Flow Builder logic pattern should be implemented to update these related records while strictly adhering to governor limit best practices?
- Query related Case records before entering a Loop, use an Assignment element inside the loop to modify field values into a record collection variable, and invoke a single Update Records element after the loop finishes.Cevap
- BQuery related Case records before entering a Loop, but execute an Update Records element inside the loop on each iteration to commit changes immediately.
- CConfigure a Fast Field Update (Before-Save) record-triggered flow on the Opportunity object to update the child Case records before the triggering record is saved.
- DCreate a roll-up summary field on the Account object that calculates open Cases and triggers an automatic update to child Case records when the Opportunity stage changes.
Cevap
Query related Case records before entering a Loop, use an Assignment element inside the loop to modify field values into a record collection variable, and invoke a single Update Records element after the loop finishes.
To process multiple records efficiently without exceeding governor limits, data retrieval (Get Records) and data persistence (Update Records) must occur outside of any Loop element. Using an Assignment element inside the loop to stage changes into a record collection variable allows all updates to be executed in a single DML operation after loop execution completes.
Adım Adım Çözüm
Anahtar Kavram
Flow Bulkification and Governor Limits
Tahmini Süre:1m 30s