Question

Difficulty: MediumFlow Builder Elements and Logic

An administrator needs to create an automated process whenever an Account record is updated with a Status of 'High Priority'. The process must find all related open Opportunities and update their Next Step field to 'Executive Review'. Which Flow Builder configuration meets these requirements while adhering to Salesforce governor limit best practices?

  1. Use a Get Records element outside the loop to retrieve the open Opportunities, iterate through them with a Loop element, update the fields using an Assignment element to populate a record collection variable, and execute a single Update Records element after the loop.Answer
  2. B
    Iterate through the related Opportunity records with a Loop element and place an Update Records element inside the loop to update each record individually.
  3. C
    Create a Roll-Up Summary field on the Account object that automatically pushes the updated text value to child Opportunity records.
  4. D
    Configure the Opportunity Record Type picklist assignment to automatically update field values on child records when the parent Account changes.

Answer

The correct configuration uses a Get Records element to query related records, an Assignment element within a Loop to populate a new collection variable, and a single Update Records element outside the loop.
To process multiple child records efficiently and adhere to Salesforce governor limits, flows must be bulkified. Using a single Get Records element prior to looping and a single Update Records element after processing the collection ensures that only one SOQL query and one DML transaction are used regardless of the number of records.

Step-by-Step Solution

1
Query related records
A single Get Records element retrieves all open Opportunities related to the Account into a collection variable.
Issuing a single query before processing avoids SOQL governor limit errors.
2
Iterate and modify records in memory
A Loop element iterates through the collection, and an Assignment element updates the Next Step field on the loop item before adding it to a target collection variable.
Updating values in memory inside the loop avoids performing database operations inside iterations.
3
Execute bulk update
A single Update Records element processes the target record collection after the loop completes.
Executing a single DML operation bulkifies the automation and operates safely within governor limits.

Key Concept

Bulkification in Flow Builder using collections and loops
Estimated Time:1m 30s
Rate this question