An administrator is designing a Flow on the Contract object. When a Contract status is updated to 'Under Review', the Flow must find all related Vendor Compliance records and update their 'Review Status' field to 'Pending Audit'. To ensure the Flow adheres to best practices and does not exceed Salesforce governor limits when processing multiple records, which two actions should the administrator take? (Choose two.)
- Add an Assignment element inside the Loop to add each updated record variable to a record collection variable.Cevap
- BPlace an Update Records element inside the Loop immediately after each record field is modified.
- Place a single Update Records element after the Loop to update the record collection variable.Cevap
- DPlace a Get Records element inside the Loop to query the latest field values for each related record individually.
Cevap
The administrator should use an Assignment element inside the Loop to add each modified record variable to a record collection variable, and then place a single Update Records element after the Loop to update the entire collection.
To follow Salesforce bulkification standards, all data manipulations must happen in memory during loop execution using Assignment elements, and DML operations must occur outside the loop using a single element acting on the collection variable. Adding each modified record to a record collection variable inside the Loop and issuing one Update Records element after the Loop achieves this requirement efficiently.
Adım Adım Çözüm
Anahtar Kavram
Bulkification in Salesforce Flow using Loop, Assignment, and Collection Resources
Tahmini Süre:1m 15s