An administrator at Northern Trail Outfitters configured a Before-Save Record-Triggered Flow (Fast Field Update) on the Opportunity object to automatically populate the `Discount_Percentage__c` field with a default value of 10% whenever it is left blank upon creation. Additionally, an active Custom Validation Rule on Opportunity blocks saving any record where `Discount_Percentage__c` is null.
If a sales representative creates a new Opportunity and leaves the `Discount_Percentage__c` field blank, what will occur when the record is saved?
- AThe save operation fails with a validation error because Custom Validation Rules execute before Before-Save Record-Triggered Flows.
- The Opportunity is saved successfully because the Before-Save Record-Triggered Flow populates the field before Custom Validation Rules are evaluated.Cevap
- CThe Opportunity is saved successfully because Before-Save Record-Triggered Flows automatically bypass all Custom Validation Rules.
- DThe save operation fails because field modifications on the triggering record can only be executed by After-Save Flows.
Cevap
The Opportunity is saved successfully because the Before-Save Record-Triggered Flow populates the field before Custom Validation Rules are evaluated.
In the Salesforce Order of Execution, Before-Save Record-Triggered Flows (Fast Field Updates) execute before Apex before triggers and before Custom Validation Rules. When the user leaves the field blank, the Before-Save Flow populates `Discount_Percentage__c` with 10% first. When the Custom Validation Rule evaluates subsequently, the field is no longer blank, allowing the record to save successfully.
Adım Adım Çözüm
Anahtar Kavram
Salesforce Order of Execution sequence between Before-Save Record-Triggered Flows and Custom Validation Rules
Tahmini Süre:1m 15s