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.


Leave a Reply