Soru

Zorluk: OrtaFlow Types and Triggers

An administrator is designing an automation solution for a custom object named Commercial_Lease__c. Whenever a commercial lease record is created or edited, two fields on the same record—Calculated_Tier__c and Initial_Deposit_Amount__c—must be populated before the record is committed to the database. The automation does not need to send notifications, access external services, or modify related child records. Which flow trigger configuration should the administrator select to fulfill this requirement with optimal performance?

  1. A
    A record-triggered flow configured for Actions and Related Records (after-save)
  2. A record-triggered flow configured for Fast Field Updates (before-save)Cevap
  3. C
    A schedule-triggered flow running on an hourly recurrence
  4. D
    An autolaunched flow without a trigger invoked by an Apex after-insert trigger

Cevap

A record-triggered flow configured for Fast Field Updates (before-save)
A record-triggered flow configured for Fast Field Updates (before-save) executes prior to the record being saved to the database. This allows field values on the triggering record ($Record) to be set directly in memory without executing an additional Update Records element or extra DML transaction, making it the most performant approach for same-record updates.

Adım Adım Çözüm

1
Analyze the automation scope and trigger target
The requirements mandate updating fields directly on the triggering Commercial_Lease__c record during create and edit operations.
Identifying whether changes affect the triggering record or related records determines the trigger optimization type.
2
Evaluate execution timing and performance requirements
Updates must occur before the record is committed to the database, without requiring external calls or related record changes.
Same-record updates prior to database commit are best handled by before-save trigger execution.
3
Select the appropriate Flow trigger type
A Record-Triggered Flow configured with 'Fast Field Updates' executes before the record is saved, optimizing performance by avoiding additional DML operations.
Fast Field Updates (before-save) are up to ten times faster than after-save updates for same-record field assignments.

Anahtar Kavram

Fast Field Updates (before-save) in Record-Triggered Flows
Tahmini Süre:1m 15s
Bu soruyu puanla