1

Context: I am migrating Case processes to flow and i am following before and after save flow design pattern. Due to some of the process scenarios i can not update fields of the same object(Case) in the before save flow, hence i am updating the case fields in after save in some scenarios.

Problem: Does the "update triggering record" element in the after save flow makes update(DML) on the record or is it just saving the field values and i have to update it at the end using update element? Followup: will the update trigger other automations to fire?

1 Answer 1

1

It's not a recommended approach to update same object in the After Save flow as it can cause recursion.

To answer your question on whether you need to explicitly, update it, the answer is YES! You need to explicitly update it if using After Update. This is why your flow will cause recursion.

Second question - will the update trigger other automations to fire? Yes it will fire other automations.

6
  • The reason i am updating the record in the after save is because if i have scenarios like on evaluation of a decision i have to update the same record and send email as well. So if i separate these two actions in before and after save i will have to evaluate the conditions twice. One time in before and the other time in the after save to send email. If there is any other workaround for that then please suggest. Commented Dec 30, 2022 at 8:17
  • Can you explain why evaluating the condition requires an update?
    – Phil W
    Commented Dec 30, 2022 at 8:30
  • @PhilW, For example consider following scenario: criteria: If case Type is Draft AND RecordType is 'ABC' then Action: 1. Update a field on Case 2. Send Email. There are a bunch of other conditions similar to above condition. So going with Before and After Save flow i will have to evaluate this criteria once in before save to update the field on case and second time in After save to send email. That is the main issue here. Commented Dec 30, 2022 at 12:34
  • That is something you simply have to live with within the flow infrastructure. This will be significantly less of an overhead compared with performing a separate DML operation (being the only way to update the trigger record in the after phase).
    – Phil W
    Commented Dec 30, 2022 at 12:53
  • The alternative is to use an apex trigger instead of a flow trigger.
    – Phil W
    Commented Dec 30, 2022 at 12:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .