Question

Difficulty: HardFlow Types and Triggers

An administrator at CloudScale Enterprise is designing an automation strategy for the custom object Patient_Onboarding_Case__c when a record status changes to 'Pending Inspection'. The automation must meet two distinct requirements:

1. Automatically calculate and set the Internal_Priority_Score__c and Audit_Status__c fields on the triggering Patient_Onboarding_Case__c record without incurring additional DML database write transactions.
2. Automatically create a child Compliance_Audit__c record and dispatch an automated email alert to the risk management team after the case changes take effect.

Which two flow trigger design choices should the administrator implement to meet these requirements efficiently while adhering to Salesforce performance best practices? (Select two.)

  1. Configure a Record-Triggered Flow optimized for Fast Field Updates (before-save) to set the Internal_Priority_Score__c and Audit_Status__c fields directly on the triggering record.Answer
  2. Configure a Record-Triggered Flow optimized for Actions and Related Records (after-save) to execute the creation of the child Compliance_Audit__c record and send the email notification.Answer
  3. C
    Configure a single Record-Triggered Flow optimized for Actions and Related Records (after-save) to update the fields on the triggering record using an explicit Update Records element before creating the child record.
  4. D
    Configure an Autolaunchable Flow containing a loop element to query existing records, calculate the priority score, and update the triggering record sequentially.

Answer

The administrator should implement a Record-Triggered Flow configured for Fast Field Updates (before-save) to populate fields on the triggering record, and a separate Record-Triggered Flow configured for Actions and Related Records (after-save) to create the child Compliance_Audit__c record and send the email alert.
To update fields on the triggering record efficiently without causing additional DML database operations, a Record-Triggered Flow using Fast Field Updates (before-save) is the correct architectural choice. To create related child records and send email alerts, a Record-Triggered Flow using Actions and Related Records (after-save) must be used because these operations require the triggering record to be saved and assigned an ID first.

Step-by-Step Solution

1
Analyze requirement 1 (updating fields on the triggering record prior to database commit without extra DML).
Identify that a before-save (Fast Field Updates) record-triggered flow is optimal because it modifies values in memory before database commit without requiring DML operations.
Before-save flows run up to 10 times faster than after-save flows for same-record updates and avoid extra save cycles.
2
Analyze requirement 2 (creating a related record and sending an email alert).
Identify that an after-save (Actions and Related Records) record-triggered flow is required.
Before-save flows cannot perform DML on related objects or execute core actions like email alerts because the triggering record ID may not yet exist in the database.
3
Combine the design choices into an optimal architecture.
Select the Fast Field Updates trigger for same-record field modifications and the Actions and Related Records trigger for related record creation and outbound notifications.
This separation adheres to Salesforce architectural guidelines for execution speed and governor limit management.

Key Concept

Salesforce Record-Triggered Flow Optimizations (Before-Save Fast Field Updates vs. After-Save Actions and Related Records)
Estimated Time:2m 0s
Rate this question