An administrator is configuring a flow to update the status of multiple Lead records. Which design pattern should the administrator use to perform the record updates while adhering to Salesforce governor limit best practices?
- Use an Assignment element inside the loop to add modified records to a record collection variable, then execute a single Update Records element outside the loop.Answer
- BPlace an Update Records element inside the loop directly after field values are updated on the single record variable.
- CPlace a Get Records element inside the loop to fetch each Lead record, followed immediately by an Update Records element inside the loop.
- DAdd a Decision element inside the loop to execute an individual Update Records element for each conditional path.
Answer
Use an Assignment element inside the loop to add modified records to a record collection variable, then execute a single Update Records element outside the loop.
The correct approach is to accumulate modified record variables into a record collection variable using an Assignment element inside the loop, then pass that entire collection to a single Update Records element after the loop completes. This pattern ensures bulkification and adheres strictly to Salesforce governor limits.
Step-by-Step Solution
Key Concept
Flow Bulkification and Data Manipulation Best Practices
Estimated Time:1m 0s