Data synchronization setup

We describe here the configuration process for an Item synchronization. The same principle can be used for any type of data synchronization.

For this scenario it is advisable to have at least two companies - a master in which the master data will be managed and one(or more) daughter(s) in which the data will be replicated. Those companies have be created in Dynamics 365 Business Central (in the same tenant or several different tenants).

We will synchronize a few accounting/commercial parameters:

  • Payment Method
  • Payment Terms
  • Customer
This is an example of synchronization. If you want to synchronize customers, you may need to add more tables.

Data Exchange Hub module activation

The Data Exchange Hub module can be enabled or disabled as needed. For this you must access via the search menu on the screen Data Exchange Hub Setup and activate the corresponding field :

Automatic Setup

From the Data Exchange Hub Setup page, select the Auto-Instal option.

This function automatically feeds the following tables :

  • Process: The process table has been completed with two processes. A synchronization processing (which determines the type of message that will be used for synchronization) and a communication processing which makes it possible to manage the communication by Web service.
  • Act: Two EDI agreements are created. One for outgoing synchronization, and one for incoming synchronization.
  • Job Queue Entry: A job queue entry is also created. It is set to run every 2 minutes. This queue is processing the sending and receiving of synchronization messages. In the present case, a modification in master company will therefore take a maximum of 4 minutes to be effective in another company.

Prerequisites

Make sure that the activation of the module and the automatic installation are carried out in the “master” company. Read the previous sections if necessary.

Also be sure to create the daughter(s) company(ies) before continuing to configure. In our example, it is the company “zCronus”.

Finally, make sure that the activation of the module and the automatic installation are carried out in the “daughter(s)” company(ies). Read the previous sections if necessary.

Setup in the “Master” company

In the “Master” company, we will focus on the “Outbound” EDI agreement. But before that we have to configure the peripheral elements.

Creation of Partner Storage for the daughter(s) company(ies)

This involves adding the following Partner storage :

General

Field Description
Code The partner storage code. To simplify, we put WEB, because the transmission will be done by WebService.
Description Free field to describe partner storage.
Process Code "DEH_WEBSERVICE” necessary for direct transfer to a company of the same or another tenant Microsoft 365 Business Central.
Process Description Value automatically retrieved.

Paramètres

Field Description
User Identification of a user in the recipient company.
This user must have sufficient rights to write to the tables you want to synchronize and read in the parameters of Data Exchange Hub.
Password User password in the recipient company.
It must be consistent with your authentication system.
For Microsoft 365 Dynamics Business Central Online users, you must put the Web Service Key of the user.
Web Service URL Base This is the base URL for accessing the destination tenant’s Web Services.
For users of Microsoft 365 Dynamics Business Central Online, it is in the form:
"https://api.businesscentral.dynamics.com/v2.0/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/yyyyyyy/WS"
"xxx” is the identifier of your destination tenant
"yyy” is the destination tenant code.
Company Name of the destination company in the recipient tenant.

Creation of the “master” company as a partner

The partner is the entity which is at the origin of the action and triggers the processing. This involves adding the following Partner:

General

Field Description
Code The partner code, here the “master” company. To simplify, we put the name of the company.
Type "Company” in order to indicate to the system that we are working with a company known from our database.
Partner Code "Cronus” is the “master” issuing company.

The list below is currently empty. Which is completely normal.

Modification of the EDI agreement in the “master” company

This involves modifying The act “SYNC_150_OUT” as follows:

General

Field Description
Active Change the field to True to activate the EDI agreement.

Tables

Field Description
Table No. The table numbers that we want to synchronize.
Priorité It is necessary to have our main “Customer” table with a lower priority. Thus the annex tables will be up to date before the main table. Avoiding errors.
Triggers We activate the 4 triggers for total data synchronization.

Partners

Field Description
Partner Code Our “master” Company, which initiates the processing.
Partner Storage Code "WEB”, here we indicate the process storage/communication with the partner.

Parameters

No changes should be made. these elements identify the message.

Mapping

We do not perform any data conversion, so the list is empty.

Setup in the “Daughter(s)” company(ies)

In each “Daughter” company, here are the steps to follow. We will focus on the “Inbound” EDI agreement. But, as for the company “Master”, let’s first configure the peripheral elements.

Creation of the Partner Storage “Daughter” Company

This involves adding the following Partner Storage:

General

Field Description
Code The partner storage code. To simplify, we put “WEB”, because the transmission will be done by WebService.
Description Free field to describe partner storage.
Process Code "DEH_WEBSERVICE” necessary for direct transfer to a company of the same or another Microsoft Dynamics 365 Business Central tenant.
Process Description Value automatically retrieved.
Act Code We put the code of the incoming EDI agreement “SYNC_150_IN” in it. This mode of communication does not necessarily identify the EDI agreement concerned. We therefore indicate here the code of the EDI agreement.

Parameters

No parameters are required when receiving data.

Creation of the “Daughter” company as a partner

The partner is the entity that is at the origin or destination of the action and triggers the processing. This involves adding the following Partner:

General

Field Description
Code The partner code, here the “Daughter” company. To simplify, we put the name of the company.
Type "Company” in order to indicate to the system that we are working with a company known from our database.
Partner Code "zCronus” is the receiving daughter company.

The list below is currently empty. Which is completely normal.

Modification of the EDI agreement in the “Daughter” company

This involves modifying The act “SYNC_150_IN” as follows:

General

Field Description
Active Change the field to True to activate the EDI agreement.

Partner

Field Description
Partner Code Our “Master” company, which initiates the processing.
Partner Storage Code "WEB”, here we indicate the process storage/communication with the partner.

Parameters

No changes should be made. these elements identify the message.

Mapping

We do not perform any data conversion, so the list is empty.

Setting done

Your configuration is done.

Any insertion, modification or deletion in the defined tables of the company “Master” will be transmitted in the “Daughter(s)“company(ies) within 4 min.

Previous