An administrator is designing an autolaunched flow to process a list of active Account records and create a follow-up Task for each Account's primary Contact. The flow will handle batch operations involving hundreds of records simultaneously. Which design pattern should the administrator implement within Flow Builder to successfully process all records without violating governor limits?
- Iterate through the Account collection using a Loop element, populate individual Task record variables, add each Task variable to a Task collection variable using an Assignment element inside the loop, and place a single Create Records element after the loop.Cevap
- BIterate through the Account collection using a Loop element, use a Get Records element inside the loop to query the primary Contact, and create the Task record immediately using a Create Records element inside the loop.
- CIterate through the Account collection using a Loop element, populate a single Task record variable, and execute a Create Records element at the end of each loop iteration.
- DIterate through the Account collection using a Loop element, aggregate child Contact counts using a Roll-Up Summary Assignment element inside the loop, and update each Account using an Update Records element inside the loop.
Cevap
Iterate through the Account collection using a Loop element, populate individual Task record variables, add each Task variable to a Task collection variable using an Assignment element inside the loop, and place a single Create Records element after the loop.
The correct approach for bulkifying flows involves staging record updates or creations in a collection variable inside the loop using an Assignment element, followed by executing a single Create Records element outside of the loop. This consumes only 1 DML operation regardless of the number of records processed.
Adım Adım Çözüm
Anahtar Kavram
Bulkification in Flow Builder using collection variables and placing DML elements outside loops