In this article, let’s learn how data can be moved between Dataverse environments using a Power Automate cloud flow.
Scenario:
- I have an environment Developer Dev that contains the following Account records.

- I have another environment Test which does not have any Account records

- Lets create a cloud flow to move Account records from the Developer Dev to Test environments.
Steps to create the flow:
- Create a new Instant Flow.

- Now add a List rows from selected environment action to fetch the Account records from the Developer Dev environment.

- Next, select the Environment and Table name as shown below.

- You can also choose options such as Select columns and Filter rows to optimize the fetch.

- Now that we have the Fetch Account Records action in place, lets loop through the fetched accounts.
- Add Apply to each control and select the value property of Fetch Account Records action as shown below.

- Now add Add a new row to selected environment action inside the Apply to each action and select Environment and Table name.
- Environment : Target environment (i.e., Test) where you want to move the data to.

- Set the Accounts table properties as shown below. I am setting the Account Name and Account Number properties using Dynamic Expression.
- Account Name : items(‘Apply_to_each’)?[‘name’]
- Account Number : items(‘Apply_to_each’)?[‘accountnumber’]

- That’s it. Save and test the flow.

- Note : If you wish to retain the same Account GUID in the target environment, set the Account property with Fetch Account Records > Account, as shown below.

- After the flow runs successfully, navigate to the target environment, and you should see the Account records.

Setting Concurrency:
- You have the option to speed up the record creation by setting the Concurrency in Apply to each control as shown below.

- For each loops execute sequentially by default. We can override the default setting to customize the degree of parallelism as shown above.
- Save and test the flow, and you will notice a performance improvement in the way records are created.
🙂

![[Step by Step] Configure and consume 'Environment Variables' of type 'Secret' using 'Azure Key vault'](https://rajeevpentyala.com/wp-content/uploads/2023/05/image.png)

Leave a reply to Rajeev Pentyala Cancel reply