Azure · Azure DevOps

[Azure DevOps Dynamics] Automate Deployment of Configuration/Master data records

Moving Configurations and Master data records from one environment to another is a tedious task. In today’s blog I will provide step by step guide to automate this process using Azure DevOps.

These steps can be added as part of main pipeline which we use to automate CRM solution deployment.

To demonstarte this use case, I have added custom entity State in my source environment and added Name & Code fields into the entity. I have also created two records in it which I will move to Target Environemnt using Azure Devops pipeline.

DOC11

Step 1: Create Schema with the help on configuration migration tool which is available in SDK. This is one time job which will have definition of what entities and fields for we need to move data to target environment.

DOC01

Step 2: Click Continue, Login to CRM Source Environement and Sellect entities and fields. For demo purpose I have selected State entity and two fields.

DOC03

Step 3: Click Tools and set settings to update records in Target environment based on some fields data. I have selected name field to be used for Update.

DOC02

Step 4: Click Save and Go to File and Click Save Schema.

Step 5: Login To dev.azure.com and Create new repository and upload exported schema file into it.

DOC04

Step 6: Create new pipeline and add below tasks as per screenshot below. For Export Configuration Migration Data provide below fields value

  1. Schema File – Select file from repository which we have uploaded in step 5
  2. Data FIle – Select as per screenshot. This is to place the exported data from CRM using Schema file
  3. Connection String – Provide connection string in below format for your source environment

AuthType=Office365;Username=user@username.onmicrosoft.com; Password=Password;Url=https://CRMORG.crm8.dynamics.com

DOC05

Step 7: Add Publish Artifact task to publish the data.zip file to Azure pipeline Artifact which will be used in Release to import data to Target environment

DOC06

Step 8: Once completed. Click save and queue. Verify if data.zip file is published to Azure pipeline Artifact.

DOC07

Step 9: Now go to Release and Create new Release. Select Artifact in Release.

DOC08

Step 10: Go to task and add below task as shown below to import configuration data to Target environment. Use Target Environment Connection String for below tasks. Select data.zip in data File option.

DOC10

Step 11: Run this release and see if records imported to target Environemnt

DOC12

 

Keep Exploring Power platform!

2 thoughts on “[Azure DevOps Dynamics] Automate Deployment of Configuration/Master data records

  1. Hi Bipin,
    Thanks for the detailed explanation of this automation.
    Is there a way to automate migration of filtered data instead of all records in the entity? For example all records created after specific date or records with specific GUIDs?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s