Question

Difficulty: HardFlow Builder Elements and Logic

An organization needs an automated solution on the Order object. When an Order's status changes to 'Activated', a record-triggered flow must set the status of all active related Asset records on the parent Account to 'Installed' and update the parent Account record with the total count of modified Assets. Which sequence of Flow Builder elements and logic should the administrator configure to achieve this outcome while strictly adhering to Salesforce bulkification and governor limit best practices?

  1. A
    Execute a Get Records element for related active Assets, loop through the collection, place an Update Records element inside the loop to update each Asset immediately, and update the parent Account using a roll-up summary calculation.
  2. Execute a Get Records element for active Assets, iterate through the collection with a Loop, use an Assignment element inside the loop to update field values and add each modified Asset to a new record collection variable, then place an Update Records element outside the loop for the collection, followed by an Update Records element for the parent Account.Answer
  3. C
    Create a Roll-Up Summary field on the Account object to count active Assets linked via lookup, then configure a single Update Records element in the flow to modify all Asset records without using a Loop or Assignment element.
  4. D
    Execute a Get Records element for active Assets, iterate through the collection with a Loop, update the picklist field directly within the loop using a Record Type Picklist Assignment element, and skip assigning records to an intermediate record collection variable prior to database commit.

Answer

Execute a Get Records element for active Assets, iterate through the collection with a Loop, use an Assignment element inside the loop to update field values and add each modified Asset to a new record collection variable, then place an Update Records element outside the loop for the collection, followed by an Update Records element for the parent Account.
The correct option follows standard Salesforce bulkification design patterns. It gathers records with a single Get Records call, uses a Loop and Assignment element to alter record values in memory and accumulate them in a record collection variable, and executes a single DML Update Records operation outside the loop.

Step-by-Step Solution

1
Query related records bulkified using Get Records
Retrieves all active Asset records related to the Order's Account into a record collection variable.
Retrieving all records in a single Get Records element avoids redundant query calls.
2
Process records in memory using Loop and Assignment elements
Updates field values on the current loop item and adds the modified item to a target update record collection variable.
Performing field assignments in memory prevents hitting DML governor limits during iteration.
3
Perform bulk DML Update outside the loop
Executes a single Update Records DML operation passing the target record collection variable, followed by updating the parent Account's counter field.
Placing data manipulation elements outside loops ensures the flow remains fully bulkified.

Key Concept

Flow Builder Bulkification and Element Sequencing
Rate this question