A financial services company requires an automated process on the Account object to update the Priority field to 'Critical' on all open child Case records whenever an Account is marked as 'High Risk'. Because an Account may have hundreds of associated open Cases, the solution must strictly adhere to Salesforce governor limits. Which Flow Builder design strategy should the administrator implement to accomplish this requirement efficiently?
- Use a Get Records element to retrieve all related open Cases into a collection, iterate through the collection with a Loop element, modify field values using an Assignment element to accumulate updated records into a target collection, and invoke a single Update Records element after the loop finishes.Cevap
- BUse a Get Records element to fetch related open Cases, iterate through them using a Loop element, and place an Update Records element directly inside the loop path to modify each Case record individually on each iteration.
- CCreate a Roll-Up Summary field on the Account object linked via a lookup relationship to iterate through child Cases, and use a Decision element to automatically update Case priorities.
- DUse an Assignment element to update the Priority field directly on the Account record type picklist assignment, relying on automated record type cascading to push changes to all child Cases.
Cevap
Use a Get Records element to retrieve all related open Cases into a collection, iterate through the collection using a Loop element, update record values within an Assignment element that adds modified records to a second collection variable, and perform a single Update Records element outside the loop.
The correct approach bulkifies the flow by performing data manipulation in memory using Assignment elements and executing only a single Update Records operation after the Loop finishes. This design scales safely for large numbers of related records without exceeding transaction governor limits.
Adım Adım Çözüm
Anahtar Kavram
Flow Bulkification and Governor Limits
Tahmini Süre:2m 0s