In my previous blog I wrote about the options for Mapping fields when creating integration between two Microsoft Dynamics CRM Organisations using the Microsoft Dynamics CRM Instance Adapter.
In this blog I will be writing about some requirements for integrating the Sample Data between two Microsoft Dynamics CRM Organisations.
The following screenshot shows a list of the Sample Data that may be installed using Settings, Data Management, Sample Data in Microsoft Dynamics CRM 2011.
When configuring integrations between two Microsoft Dynamics CRM Organisations it is important to ensure that Parent records exist/created in the destination Organisation prior to the integration of dependent Child records. The following diagram shows the relationships that exist in the Sample Data.
There are a number of Parent/Child relationships:
• Account to Case
It is important to ensure that the Data Maps are ordered/scheduled in such a way that Parent records are created prior to dependent Child records. For the Sample Data, the following order should suffice:
• 1. Campaign• 3. [1] Subject (The Default Subject already exists in Microsoft Dynamics CRM 2011).
• 5. [1] Account
• 7. Opportunity
• 12. [2] Goal (Parent Goal Metrics already exist in Microsoft Dynamics CRM 2011).
[1] There is a potential issue here, because there are recursive relationships between Account and Contact and between Subject and Subject.
[2] It is important to ensure that prior to importing the Goals that the Fiscal Year Settings in the Destination Organisation is set to use the Quarterly Fiscal Period Template.
It is assumed that all records to be integrated will be owned by either the Destination Organisation Integration User, or a User/Team in the Destination Organisation with the same Name as the User/Team in the Source Organisation. The Microsoft Dynamics CRM Instance Adapter attempts to match Users and/or Teams by their Name.
The Connector has a built in mechanism for retrying the integration of records up to seven times over successive periods of time. This allows for related Parent records to be subsequently created in between the retry attempts for the dependent Child records. The following Status messages may be recorded in the Log for the Data Map:
• Attempting to integrate - This record is in a retry state and will continue to retry integration until it either integrates successfully or the maximum number of retries (7) is reached. If the maximum number of retries is reached and the record does not successfully integrate, the status will change to Failed to integrate. You can double-click the message to view the message details where you can stop retrying, or reset retries.
As a simple test I chose to integrate Subjects and Articles:
I set the Check For Data Modified After settings to 1/01/2013:
After starting the Connector for Microsoft Dynamics CRM Service, the records for these entities were successfully synchronised from the source Organisation to the destination Organisation. The following information was recorded in the Log:
However, I discovered that the Default Subject record was duplicated in the Destination Organisation.
This was because it already existed in the destination Organisation. I then retested after setting the Check For Data Modified After settings to a date/time after that on which the source Organisation was created but before that on which the Sample Data was installed.
In my next blog I will summarise my findings for the integration of the Article records and continue my review of using the Dynamics CRM Instance Adapter to integrate the Sample Data.