In it’s recent white paper (Date: September 2015), Microsoft has explained the architecture behind the Outlook Synchronization in Microsoft Dynamics CRM. Reading the white paper gives a better idea about the “behind-the-scene” processes which take place when you are synchronizing your Outlook with your Dynamics CRM organisation. I have taken the liberty to highlight a few key points of the paper.
Changes to items in Outlook
The Outlook synchronization process detects changes by monitoring MAPI change notifications, which Outlook generates whenever an item is altered. When a MAPI notification is detected for an item that is marked for synchronization, an entry recording this is added to the OutlookSyncTable in the Outlook Sync Client Cache.
This ensures that changes to CRM tracked items inside Outlook are picked up by CRM even when these changes occurred in the absence of the CRM add-in (for example, the add-in was disabled during the change or changes were made via Outlook on the web or through native applications on mobile devices).
Note: MAPI is a Messaging API that was developed for building solutions on Microsoft Outlook.
Changes to items in Dynamics CRM
CRM changes are fetched by calling the PrepareSync API on the server, which identifies the number of items on the server that have changed for a particular client and returns that summary information since the last time a successful synchronization of such changes was performed. With this information, a GetSyncData call will be made against the server with a columnset that only contains the CRMID and the timestamp of the changed items.
For the items retrieved in this way, the PostSync API will be called to identify to the server that the change on the item has been processed. The items are then added to the OutlookSyncTable in the CRM for Outlook Sync Cache for later processing.
Service activities and service appointments
I had a painful experience in the past trying to synchronize modified service activities from Outlook back to CRM, which does not work by default (read: it is designed not to work that way).
The white paper clearly confirms this, but does not explain the reason behind this set up:
You can push service appointments in CRM to Outlook as a regular appointment, but the appointment in Outlook won’t sync back to CRM, and you should always modify the service appointment in CRM to provide consistency. Directly updating the appointment in Outlook is not allowed nor recommended.
Any further explanation would be greatly appreciated. So if anybody has more info about this, feel free to share it!
If you are interested in reading the full white paper, you can download it here.