An administrator is designing an autolaunched flow that processes a large collection of Opportunity records associated with an Account to aggregate financial metrics and update parent fields. Which two data manipulation and resource design practices should the administrator implement to ensure the flow executes within Salesforce governor limits? (Select 2 options)
- Filter records directly within the Get Records element query criteria rather than retrieving all records and filtering them downstream using a Decision element.Cevap
- Use an Assignment element inside the loop to accumulate values into a variable, then perform a single Update Records element outside the loop.Cevap
- CPlace an Update Records element inside the Loop element to save changes to each Opportunity record individually during each iteration.
- DPlace a Get Records element inside the Loop element to re-query related line items for each Opportunity on every loop iteration.
Cevap
The correct practices are to filter records directly within the Get Records element query criteria and to accumulate values in a variable using an Assignment element inside the loop while placing the Update Records element outside the loop.
Filtering criteria directly inside the Get Records element reduces database overhead by retrieving only necessary records. In addition, using Assignment elements inside the loop to build in-memory updates or collections and executing database operations outside the loop ensures the flow is bulkified and compliant with governor limits.
Adım Adım Çözüm
Anahtar Kavram
Flow Bulkification and Resource Management