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 Terms
- Shipment Method
- Customer
- Payment Method
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 |
---|---|
Client Id | ID application (Client) the registration of applications previously created in the Azure Portal of the Business Central tenant. Obtained in chapter Settings - Technical prerequisites |
Client Secret | Value of Secrets Client generated from the application in the Azure Portal of the Business Central tenant. Obtained in chapter Settings - Technical prerequisites |
ID Tenant AAD | This is the directory ID (tenant) described in the application previously created in the Azure Portal of the Business Central tenant. Obtained in chapter Settings - Technical prerequisites |
Name of the BC environment | This is the name assigned to the environment (Example: Production, Recipe, Dev) present in the URL: -https://businesscentral.dynamics.com/66afbc46-2d80-444c-a0c5-b37450d2b258/Production. |
Société | This is the systemId of the recipient company which is available in the Company page with the Page Control function (Ctrl + Alt + F1) |
look in chapter Settings - Technical prerequisites
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 5 triggers for total data synchronization. |
Table filter | Here you can define a complex filter based on all fields of the table. |
Field selection | You can define if you want to synchronize only certain fields in the table.
It is recommended not to synchronize system fields that can be identified by numbers >
2000000000.
To select the fields click on the action Table puis Fields to be synchronized |
Partners
Field | Description |
---|---|
Partner Code | Our “master” Company, which initiates the processing. |
Partner Storage Code | "OAUTH”, 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 code of the partner storage which must be mandatory identical to the master company, i.e. “OAUTH” in our example. |
Description | Free field to describe partner storage. |
Process Code | "DEH_OAUTHWEBSERVICE” 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”, allowing to identify the EDI agreement concerned. |
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 “Daughter” company, which initiates the processing. |
Partner Storage Code | "OAUTH”, 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.