Soru

Zorluk: OrtaOrder of Execution and Automation Considerations

An administrator is configuring automation for a custom Equipment_Inspection__c record in Salesforce. The configuration includes custom validation rules, a before-save record-triggered flow (fast field updates), an after-save record-triggered flow (actions and related records), and parent roll-up summary fields.

Which two statements accurately describe how Salesforce processes these automation components during the order of execution? (Choose two.)

  1. Before-save record-triggered flows evaluate and update field values prior to the execution of custom validation rules.Cevap
  2. B
    Custom validation rules execute before before-save record-triggered flows to prevent invalid data from entering flow logic.
  3. Roll-up summary field calculations on related parent records are evaluated after after-save record-triggered flows have executed.Cevap
  4. D
    After-save record-triggered flows execute before Apex after triggers fire on the record being updated.
  5. E
    The database commit operation occurs immediately prior to running after-save record-triggered flows to lock in record changes.

Cevap

The statements confirming that before-save record-triggered flows execute prior to custom validation rules and that roll-up summary field calculations occur after after-save record-triggered flows are correct.
In the standard Salesforce order of execution, before-save record-triggered flows execute before Apex before triggers and custom validation rules. This allows declarative logic to prepare values that validation rules can subsequently check. Later in the cycle, after the record is written to the database and after-save record-triggered flows have run, Salesforce calculates roll-up summary fields on parent records before performing the final database commit.

Adım Adım Çözüm

1
Analyze the position of fast field updates (before-save flows) relative to validation rules.
Before-save record-triggered flows execute in step 3, before Apex before triggers (step 4) and custom validation rules (step 5).
Salesforce evaluates before-save flows first so any automated value modifications are validated by system and custom validation rules.
2
Analyze the position of after-save record-triggered flows relative to Apex after triggers and roll-up summary fields.
Apex after triggers execute in step 8, after-save record-triggered flows execute in step 13, and roll-up summary calculations execute in step 15.
After-save flows run after the record has been written to the database but before parent roll-up summary values are recomputed.
3
Evaluate the timing of the database commit operation.
The database commit is step 17, occurring only after all after-save automations and roll-ups complete without exceptions.
Executing the commit at the end ensures that any failure in subsequent automations can roll back the entire transaction.

Anahtar Kavram

Salesforce Order of Execution sequence for record-triggered flows, validation rules, triggers, roll-up summaries, and database commits.
Tahmini Süre:1m 15s
Bu soruyu puanla