You are here:
Simultaneously Update Fields in Multiple Records Example
This example creates a flow that updates fields in multiple records by reassigning account ownership based on business rules.

Use more general search terms.
Select fewer filters to broaden your search.
You are here:
This example creates a flow that updates fields in multiple records by reassigning account ownership based on business rules.
First, create an Account-based record collection variable called
collReassignedAccts.
Next, add the Get Records element to get all account records that John Smith owns.
Then create a loop that iterates through the collection. For each item in the collection, the loop:
collReassignedAccts collection.
collReassignedAccts with the new OwnerId after the
loop finishes iterating through the collection.
This section of the flow uses a single query to look up the list of accounts and a single DML statement to update those accounts. If you updated the records by setting the fields individually, you would use:
One Update Records element to find all accounts that John owns and have more than 10,000 employees (1 query). Then update those records’ OwnerId to Madison’s Id (1 DML statement).
One Update Records element to find all accounts that John owns and don’t have more than 10,000 employees (1 query). Then update those records’ OwnerId to Amber’s Id (1 DML statement).

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.