Soru

Zorluk: ZorAutomation Tool Selection

A logistics enterprise uses a custom object named Freight Shipment to track international deliveries. The operations team has defined two requirements when a Freight Shipment record is updated:

1. Automatically calculate and update the Estimated Delivery Date and Risk Status fields on the triggering Freight Shipment record prior to saving changes to the database.
2. If the shipment status is updated to 'Delayed', automatically create a related Audit Task record assigned to the logistics manager.

Which automation design adheres to Salesforce architecture best practices while optimizing performance?

  1. Implement a before-save Record-Triggered Flow (Fast Field Updates) for updating the Freight Shipment fields, and an after-save Record-Triggered Flow (Actions and Related Records) to create the Audit Task record.Cevap
  2. B
    Implement a single after-save Record-Triggered Flow (Actions and Related Records) that performs an explicit Update Records DML element on the triggering Freight Shipment record and creates the Audit Task record.
  3. C
    Implement a Record-Triggered Flow that retrieves related Freight Shipment records, loops through them, and executes an Update Records DML element inside the loop to recalculate field values.
  4. D
    Implement a Roll-Up Summary field on the parent Account object linked via a Lookup relationship to automatically trigger field updates and task creation on the Freight Shipment record.

Cevap

Implement a before-save Record-Triggered Flow (Fast Field Updates) for updating the Freight Shipment fields, and an after-save Record-Triggered Flow (Actions and Related Records) to create the Audit Task record.
The requirement specifies modifying fields on the triggering record as well as creating a related Audit Task record. Salesforce best practice dictates using a before-save Record-Triggered Flow (Fast Field Updates) to modify fields on the triggering record without incurring extra DML overhead, and using an after-save Record-Triggered Flow (Actions and Related Records) to create related records after the primary record has been committed to the database.

Adım Adım Çözüm

1
Analyze the requirement for same-record field updates.
Field updates on the triggering record before database commit require a Fast Field Updates (before-save) Record-Triggered Flow.
Before-save flows execute up to 10x faster than after-save updates because they modify values in memory before the record is saved to the database.
2
Analyze the requirement for creating a related record (Audit Task).
Creating related records requires an Actions and Related Records (after-save) Record-Triggered Flow.
Before-save flows cannot generate record IDs or create external/related objects like Task.
3
Combine into an architectural automation tool choice.
Use a combination of before-save for same-record field updates and after-save for related record creation.
This complies with Salesforce architectural recommendations for optimal performance and governor limit efficiency.

Anahtar Kavram

Selecting optimal Record-Triggered Flow trigger types (Fast Field Updates vs. Actions and Related Records) based on execution timing and target record context.
Bu soruyu puanla