A Salesforce Administrator is constructing an autolaunched flow that iterates through a collection of Case records, updates the Case status, and generates a follow-up Task for each Case. Which TWO design practices must the administrator implement within Flow Builder to ensure bulkification and avoid hitting governor limits? (Select TWO)
- Use an Assignment element inside the loop to add modified Case records to a record collection variable, then execute a single Update Records element outside the loop.Cevap
- BPlace an Update Records element inside the Loop container to commit field changes immediately for each Case record during every iteration.
- Use an Assignment element inside the loop to populate Task record details into a record collection variable, then invoke a single Create Records element outside the loop.Cevap
- DInsert a Get Records element inside the loop to check for existing open Task records related to each Case during iteration.
Cevap
The correct practices are using an Assignment element inside the loop to stage updated Case records in a record collection variable before performing a single Update Records call outside the loop, and using an Assignment element inside the loop to populate Task records into a collection variable before performing a single Create Records call outside the loop.
Bulkification in Flow Builder requires keeping database operations (SOQL queries and DML operations) outside of loop containers. Using Assignment elements within the loop allows the administrator to manipulate values and construct record collections in memory. Once all iterations complete, single DML elements (Update Records and Create Records) execute against the staged collection variables in a single transaction call.
Adım Adım Çözüm
Anahtar Kavram
Flow Bulkification and Loop Best Practices