User Review
( votes)Continuing our previous post where we used the replication package
here we will see how we can use the synchronization service for bi-directional sync.
Below of the prerequisites of synchronization package to perform bi-directional sync –
- We need to use the created on and modified on fields of the Entity
- The synchronized tables to have an auto-generated primary key.
So here we need to alter the SQL Azure’s Contact table that was auto-created earlier by the Replication package to have the auto-generated primary key.
Connect to the SQL Azure database using Skyvia’s Query service and perform the alter operation
Or use the Query Editor (preview) of Azure
With necessary changes made, let us create a new Synchronization package
Specify the connection and click on Add Task to create the synchronization task.
We have specified contact entity from Dynamics CRM Source and contact table in SQL Azure which was earlier created for us by the replication package.
It automatically maps all the columns here based on the column name.
We can also manually specify mapping here for both Source To Target and Target to Source fields to be used for sync.
Click on Finish once done with the mapping.
Similarly to replication packages, the synchronization packages can be scheduled.
Click on Save to create the Task.
Click on Run
The run history shows the 220 records synced from Dynamics CRM to SQL Azure.
We can see the 220 records created in our SQL Azure DB
Now let us update a record in SQL Azure and run the package again.
We can see the record updated in Dynamics CRM
Now let us delete a few records from Azure SQL and run the package
We can see the records delete from Dynamics CRM
Similarly, let us delete a couple of records from Dynamics CRM and run the package
We can see the 8 records deleted in the destination SQL Azure
Thus, we saw how easy it is to do bi-directional sync using Skyvia’s Synchronization package.
Hope it helps..