Dual-write Integration Key’s Nitty-Gritty

Dual-write allows the real-time integration of data between D365 CRM and F&O environments.

Well! While integrating two systems it is must that both the system knows how to find the respective record in other system’s table. This is where the Integration key comes into the picture.

Integration Key tells Dual-write engine, what columns to be taken into consideration while finding the respective record in D365 CRM.

Let me explain this with an example,

Consider in F&O there is a Customer (it synchronizes to the Account table in D365 CRM) with the Customer Number as DEMF001 and this has already been synchronized to D365 CRM. Now, next time if any update is made to the DEMF001 record in F&O the updated details should synchronize back to the right record. How will Dual-write engine know which is the respective record in D365 CRM? It is with the help of Integration Key. For this scenario I would configure the integration key as below.

Integration Key

Note: Company is equivalent to F&O’s Legal Entities.

Alternate Keys

Alternate Keys

Let us understand, how this is related to Alternate Keys in D365 CRM. In the D365 CRM, the main purpose of Alternate Key is to facilitate an integration with another system that usually do not use GUIDs as the primary key and have a different Primary Key. Also, Alternate Key in CRM makes sure that the value for the column(s) which is/are part of the Alternate Key is unique or else it will throw an error. It is best practice to define the Alternate Key and it will automatically be translated to as the Integration Key in Dual-Write.

Note: If your table has multiple Alternate Keys make sure to manually check the Integration Key whether the right one is applied or not.

Migrate Integration Key from one environment to another

The question whether the Integration Key can be transferred from one environment to another is quite a valid question, so to answer it yes, it is possible. However, it is not a straightforward process. For the Integration Key to be available at the destination environment, along with moving over the Dual-write mappings, you need to make sure that the table that you are trying to move has the Alternate Key defined with the right columns. Alternate Keys will then be translated as the Integration Key.


This way even the Integration Key would be automatically added.

Dual-write Mapping is Solution Aware

Yes, you heard it right, Dual-write mapping is solution aware meaning it can be exported from one environment and can be imported into another with the help of our beloved solutions.

The process of adding the Table mapping to a solution is straightforward.

In this blog, we will explore the process of adding the Table mapping to a solution as well as after importing the solution to the destination environment we will see how to use the latest version of the mapping.

Will be changing the CDS sales quotation header (quotes) table map (this comes along with the installation of Dual-write solutions) and save it with a different (higher) version and a publisher. (This blog will concentrate on moving the table mapping from one environment to another and after that on applying the latest version and will not cover the steps on how to change an existing table mapping)

Before Changes:

Before Changes

After Changes:

Steps on adding the Dual-write (Table) Mapping to a solution:

Step 1

Navigate to https://make.powerapps.com. From the top right-hand side corner choose the right Environment and go to the Solutions tab.

Select environment and the solution

Step 2

Open the solution in which you want to add the mapping (or create a new if you do not have one).

Click Add existing -> More -> Other -> Dual Write table map

Steps to reach Dual write table map while adding in the solution

Step 3

From the Add existing dual write table maps screen, search for the table mapping name and then select the right mapping and click Add.

Add existing dual write table maps screen to add the table map
Note: If you are adding the table mapping in an existing solution and the table mapping in question already exists with an older version then kindly remove the older mapping from the solution first and then add the new one.

Step 4

Next step is to export the solution (preferably managed if moving to a Production environment) and import it in the target environment.

Once the solution is imported, it is time to look at how to use the latest table mapping.

Steps for enabling the latest table mapping:

Step 1

In the Dual-write module click on Apply Solution.

Apply solution button

Step 2

In the Apply Solution screen select your solution and click on Apply.

Table mapping Apply solution screen

Step 3

Search for the Table Map then select the Table map from the list and click on Table map version.

Table map version button

Step 4

Select the right Table map and click Save. Voila!!!

Table map version


It is easy to move the table map from one environment to another.

In the next blogpost, I have discussed in detail about the Dual-write Integration Key.

%d bloggers like this: