Soru

Zorluk: Çok zorFlow Builder Elements and Logic

A System Administrator is configuring a Record-Triggered Flow on the Case object that executes when a Case status is updated to 'Escalated'. The requirement states that for every escalated case, all associated open Work Order records must have their Priority set to 'Urgent' and an escalation timestamp recorded. To ensure the flow operates efficiently without exceeding governor limits during bulk updates, which TWO flow design elements and logic patterns must the administrator use? (Select 2 answers)

  1. Use an Assignment element inside the loop to append each modified Work Order record to a Record Collection Variable, followed by a single Update Records element placed after the loop path.Cevap
  2. Utilize a single Get Records element prior to the loop element to retrieve the collection of related Work Order records matching the criteria.Cevap
  3. C
    Insert an Update Records element directly inside the Loop element to immediately commit changes to each Work Order record during iteration.
  4. D
    Define a Roll-Up Summary field on the Case object to sum the open Work Order records using their standard lookup relationship.

Cevap

The administrator must use an Assignment element inside the loop to accumulate modified records into a collection variable and perform a single Update Records element after the loop, as well as execute a single Get Records element prior to entering the loop.
To adhere to Salesforce governor limits and best practices for flow bulkification, data retrieval (Get Records) must occur before entering a loop, and data modification (Update Records) must occur once after the loop completes using a collection variable. Accumulating record updates into a record collection using an Assignment element inside the loop allows a single DML operation to update all child records simultaneously.

Adım Adım Çözüm

1
Identify query bulkification requirements prior to iteration.
Place a single Get Records element before the loop to retrieve all open Work Order records into a collection.
Prevents executing SOQL queries inside the loop, avoiding SOQL query governor limits.
2
Modify records in memory within the loop.
Use an Assignment element inside the loop to set field values and add the updated record to a target Record Collection Variable.
Prepares updated values in heap memory without triggering individual database DML calls.
3
Commit changes in a bulkified operation after loop exit.
Place a single Update Records element after the loop path finishes, passing the Record Collection Variable.
Executes one DML update statement for the entire set of records, respecting DML governor limits.

Anahtar Kavram

Flow Bulkification and Governor Limits in Flow Builder
Bu soruyu puanla