An administrator is designing an autolaunched flow to process renewal opportunities associated with an Account. The flow must retrieve all related opportunities, isolate open renewal opportunities, modify their target dates, and commit the changes to Salesforce while adhering to governor limit best practices. Arrange the following flow execution steps in the correct sequential order from first to last.
- 1Execute a Get Records element to retrieve all Opportunity records linked to the Account ID into a record collection variable.
- 2Apply a Collection Filter element to reduce the record collection variable to include only open Renewal Opportunities.
- 3Iterate through the filtered collection using a Loop element, and use an Assignment element inside the loop to update field values on the loop item and add it to a separate update collection variable.
- 4Execute an Update Records element after the loop completes using the update collection variable.
Answer
The correct sequence is: 1) Execute a Get Records element to retrieve related Opportunity records. 2) Apply a Collection Filter element to isolate open renewal opportunities. 3) Iterate through the collection with a Loop element and use an Assignment element inside to update record fields and add items to a separate collection variable. 4) Execute an Update Records element after the loop finishes using the update collection variable.
The correct design sequence adheres to Salesforce bulkification principles: First, retrieve all records using Get Records. Second, filter the collection in memory using Collection Filter. Third, iterate over the filtered collection with a Loop and use Assignment elements to modify record values and store them in an output collection variable. Fourth, execute a single Update Records element after loop completion to update all records in one DML statement.
Step-by-Step Solution
Key Concept
Bulkified Flow Data Manipulation and Resource Processing Sequence
Estimated Time:2m 0s