Loading
Prepare for Email to Become the Default Login ExperienceRead More
Intermittent freezing when using using certain browser versionsRead More
Automate Your Business Processes with Salesforce Flow
Update Records Element

Update Records Element

Identify Salesforce or Marketing Object records to update, and set the values to change in those records. To do so, use the IDs and field values stored in a record variable or record collection variable, or use specify conditions to identify the records and set the field values individually.

Required Editions

View supported editions.

In the Update Records element, your selection for how to identify the records or related records to update and set their values determines what to enter in the rest of the element.

This video explains how to use data elements to create, update, and delete records using a flow.

View this video in a separate tab.

Use a record variable or record collection variable

If you’ve populated a record variable or record collection variable with the field values to change, choose to use the IDs and field values from a record variable or record collection variable, and then select the variable to use. To update the field values in a record variable or record collection variable, configure an Assignment element earlier in the flow.

Important
Important For the variable that you select, make sure that each record’s ID value is set. That ID value is how the flow identifies which records to update.

When you use a record collection variable to update multiple records at once, you reduce the number of DML requests in your flow. That means you’re more likely to stay within your org’s limits. For more information, see Flow Bulkification in Transactions.

Use conditions and set fields individually

Otherwise, choose to use conditions and set fields individually. Choose the object whose records or related records you want to update, add conditions to filter down the list of records, and set the field values to change for those records. You can update any field on the record, but the Update Records element doesn’t know which fields are required for this object.

Important
Important Configure at least one filter condition, or the flow updates all the records for the object.
Example
Example On an opportunity record, when a user clicks the “Won” button, a flow updates the opportunity’s stage.

Considerations for Defining Filter Criteria

  • When you define multiple filters, the filter logic usually defaults to AND. However, if multiple filters have the same field selected and use the equals operator, the filters are combined with OR.

    For example, your filters check whether a case’s Type equals Problem (1), Type equals Feature Request (2), and Escalated equals true (3). At run time, the filters are combined to (1 OR 2) AND 3.

  • The available filter operators depend on the data type of the selected fields. For details, see Flow Operators in Data Elements and Record Choice Sets.

Usage

Note
Note At run time, the record isn’t updated until the interview’s transaction is completed. Transactions are complete when the interview either finishes or runs a Screen, Local Action, or Wait element.
 
Loading
Salesforce Help | Article