Automation, Flow, Lightning

Update or Assignment Element in Before Save Record-Triggered Salesforce Flows?

In Summer ’21 Salesforce released a seemingly small feature. You can now use update elements in Record-Triggered flows to update the field values that triggered the flow regardless of whether that flow is set to run before-save or after-save.

Before Summer ’21, you had to use the assignment element to update these field values in a before-save situation. And this was very confusing for new flow developers learning record-triggered flows.

Here is how you would do your flow before Summer ’21:

Your assignment element would look like this:

After Summer ’21 you can use an update element. You can still use an assignment element, as well, if that is what you prefer. Your flow will look like this (same for both before and after save flow):

I recommend using the update element for all record-triggered flows. If you need to change your flow from before-save to after-save at some point, you can easily do that.

Enjoy.

2 thoughts on “Update or Assignment Element in Before Save Record-Triggered Salesforce Flows?”

  1. If you would have an after save flow with multiple outcome orders in a decision element. Let’s say 3 of them. And you need to create a new record. Would you then use 3 times a create record element (for every outcome) ? or would you use 3 assignment elements that will all connect to 1 create record element?

    1. I personally prefer formula + assignment is that’s possible. However from a performance standpoint, I don’t think it matters because you won’t ever do more than one create in any run even if you have let’s say three create elements. Your decision criteria should be mutually exclusive to ensure that. Great question. Thanks.

Leave a Reply