Skip to main content
Rohit . (360 Cloud Solution) 님이 #Flow에 질문했습니다

I have a Record-Triggered Flow on the Account object that should update a field on related Contacts whenever the Account’s Billing City changes.

I’m confused about whether this should be a Before-Save or After-Save Flow.

Since Before-Save Flows are faster, can we use a Before-Save Flow to update the related Contact records, or is an After-Save Flow required?

Also, what would be the most bulk-safe approach if an Account has 500+ Contacts?

What is the recommended approach and why? 

 

#Flow  #Salesforce Admin

답변 4개
  1. 9월 1일 오전 7:16

    The recommended approach is an After-Save (Actions and Related Records) Record-Triggered Flow.

    • Before-Save Flow: Use it when you only need to update fields on the triggering Account record itself. It’s faster because Salesforce can update the record before committing it to the database, but it is not intended for updating related Contact records.
    • After-Save Flow: Required when you need to perform actions on related records, such as updating Contacts when the Account’s Billing City changes. The Account must be saved first, then the Flow can update its related Contacts.

    For 500+ Contacts

    For bulk safety, avoid doing a Get Records + Loop + Update Records pattern if you can update the related Contacts directly.

    A good design is:

    1. Trigger when Account is updated.
    2. Add a condition so the Flow runs only when Billing City has changed.
    3. Use Update Records to update Contacts whose AccountId equals the triggering Account's Id.
    4. Set the Contact field to the Account's new Billing City.
    5. Let Salesforce handle the collection update rather than performing a separate DML operation for every Contact.

    This is significantly better than putting an individual Update Records inside a loop, because Flow can perform the update as a collection and reduce unnecessary database operations.

0/9000