CRM Outlook, Dynamics CRM

Cleaning up CRM Sync Entry tables in CRM 2016 and Dynamics 365

Sometimes, there are problems with this sync and the user can’t go offline. To fix this error, you might clean up the tables with the synced information. This means, that the client seems to be a “new” client to CRM and will be fully resynced on the next offline-sync.

Each client, which is registered with the CRM outlook client (online and offline), gets a subscription ID in the subscription table in the CRM-database.

Each time the client goes offline with the CRM outlook client, the data is synced to the client, but also saved with the synced version in the CRM-database.

Be aware, that this script is not supported by Microsoft itself. Take a backup of your database, before you execute the script.
The script is based on the following sql-script from Microsoft.

The Microsoft-Script only supports CRM 2011, this script supports CRM 2016 and Dynamics 365.

 

Update:

Some of you might still use the CRM Client in Outlook (also called Dynamics 365 for Outlook). Since the mid of 2017, Microsoft set this product as deprecated https://blogs.msdn.microsoft.com/crm/2017/08/08/deprecation-of-dynamics-365-for-outlook/ .