Soru

Zorluk: ZorFlow Types and Triggers

An enterprise administrator is optimizing automation performance for a high-volume custom object named Asset_Maintenance_Log__c. The business requirement specifies that whenever an Asset_Maintenance_Log__c record is created with a status of 'Critical', the system must automatically populate the Priority_Code__c field to 'P1-Immediate' and compute an SLA deadline field directly on the triggering record prior to committing the record to the database. The solution must execute with maximum efficiency without incurring extra DML transactions or triggering secondary order-of-execution save cycles. Which flow trigger configuration best fulfills these requirements?

  1. A Record-Triggered Flow optimized for Fast Field Updates (Before-Save) configured for record creation when Status equals 'Critical'Cevap
  2. B
    A Record-Triggered Flow optimized for Actions and Related Records (After-Save) that utilizes an Update Records element targeted at $Record
  3. C
    An Autolaunchable Flow invoked by a Record-Triggered Flow that receives $Record as an input variable and issues a DML update
  4. D
    A Schedule-Triggered Flow configured to run hourly to query newly created 'Critical' records and update their field values in bulk

Cevap

A Record-Triggered Flow optimized for Fast Field Updates (Before-Save) configured for record creation when Status equals 'Critical'
Configuring a Record-Triggered Flow optimized for Fast Field Updates (Before-Save) is the Salesforce best practice for updates restricted to the triggering record. It updates values in memory before database commit, executing up to 10 times faster than After-Save flows without consuming additional DML statements or re-initiating the order of execution.

Adım Adım Çözüm

1
Analyze the automation requirement target and timing
The requirements target updating fields solely on the triggering record ($Record) immediately upon record creation.
Determining whether changes affect the triggering record or related records is key to choosing the correct flow trigger optimization.
2
Evaluate Salesforce order of execution and performance constraints
Fast Field Updates (Before-Save flows) run before the record is saved to the database.
Modifying $Record values during the before-save phase updates the field values in memory prior to the SQL INSERT/UPDATE, avoiding extra DML database statements and secondary trigger executions.
3
Compare Before-Save vs After-Save and asynchronous execution options
Before-Save record-triggered flows are significantly faster than After-Save flows or subflows performing explicit DML updates, and meet the real-time requirement unlike scheduled flows.
Salesforce architecture guidelines recommend Fast Field Updates whenever field modifications are restricted to the triggering record.

Anahtar Kavram

Fast Field Updates (Before-Save Record-Triggered Flows) vs. Actions and Related Records (After-Save Record-Triggered Flows)
Tahmini Süre:2m 0s
Bu soruyu puanla