A Salesforce Administrator is designing an autolaunched flow to update related records when a Project record's status changes to 'Completed'. The flow must set the status of all open child Project Task records to 'Closed'. Which TWO implementation strategies should the administrator use within Flow Builder to fulfill this business requirement efficiently without exceeding governor limits?
- Execute a single Get Records element before any loop to retrieve all open Project Task records associated with the Project.Cevap
- Iterate through the retrieved records, modify the status using an Assignment element inside the loop, and execute a single Update Records element outside the loop on the record collection variable.Cevap
- CPlace an Update Records element directly inside the Loop element to immediately save changes for each Project Task record as it is processed.
- DCreate a Roll-Up Summary field on the parent Account record using its standard Lookup relationship to child Project Tasks to update the count without using Flow logic.
Cevap
The administrator should execute a single Get Records element outside any loop to query the necessary Project Task records and use an Assignment element inside the loop to aggregate modified records into a collection variable, followed by a single Update Records element outside the loop.
To maintain optimal flow execution and adhere to Salesforce governor limits, data retrieval (Get Records) and data manipulation (Update Records) elements must always be placed outside of loops. Using an Assignment element inside the loop allows for field values to be set in a collection variable in memory, enabling a single bulk update operation once loop processing completes.
Adım Adım Çözüm
Anahtar Kavram
Flow Bulkification and Governor Limit Prevention