A System Administrator is creating a record-triggered flow to process changes across related records. Which two practices should the administrator follow when manipulating data and managing resources inside a loop? (Select 2 answers)
- Use an Assignment element inside the loop to add modified record variables into a record collection variable.Answer
- BPlace an Update Records element inside the loop to update each record immediately during every iteration.
- CExecute a Get Records element inside the loop to retrieve details for each child record individually.
- Place an Update Records element outside the loop to process the record collection in a single database operation.Answer
Answer
The correct practices are using an Assignment element inside the loop to gather modified record variables into a collection, and placing the Update Records element outside the loop to execute a single bulkified DML operation.
To adhere to Salesforce bulkification standards, administrators must perform variable assignments inside the loop using an Assignment element to populate a collection variable in memory. Once the loop finishes iterating, a single Update Records element placed outside the loop updates all records in the collection in one database transaction.
Step-by-Step Solution
Key Concept
Flow Bulkification and Resource Management