CRM Client for Outlook Upgrade over two Versions
Two version hop
In case of a CRM upgrade to the next but one version, e. g. from 2011 to 2015, it is recommended to uninstall the old client and after that install the target version. Because CRM must be available for the last step of configuration, the sequence is as follows:
- Synchronize all data: Outlook contacts, appointments, tasks
- Uninstall client for Outlook
- Clean up data: Outlook contacts, appointments, tasks
- (Optional but recommended) Clean up remaining client files on the disk
- Install current client for Outlook
How to avoid explosive data duplication
When the old CRM client is uninstalled, the CRM references remain in the Outlook data file for contacts and other data. At this point there is no problem, because theoretically it is possible to reconnect the items to the upgraded CRM database later on.
When the new client is set up, however, some properties of the CRM references get lost including the record id (GUID as primary key, e. g. Account-ID).
An accident would occur at the next synchronization between Outlook and CRM: Relicts of CRM properties make old synchronized objects be considered as related to CRM, but – because the id is gone – a new record is created in CRM for each contact, appointment or task which had been synchronized before. Because all clients act like this, in the end the records will be replicated numerous times!
The solution is to remove these records from the Outlook folder before installation. This could be done manually by adding a CRM property as column to the list of contacts etc., or semi-automatically by executing a macro.
Another solution would be to remove the CRM properties only, leaving the data in place for backup. In this case better move it to a separate folder to don’t mix it up with fresh data.
How to see the CRM properties in Outlook
When the CRM reference properties are made visible the data which is dangerous during CRM client upgrade can be manually deleted or moved. Identify the items to be handled by filtering or sorting. This can be applied to all CRM synchronized data, that is e-mails, contacts, appointments and tasks. The example shows how to add a CRM property (containing the reference data) as column to a list: In the header line’s context menu select „View Settings…“ and add a new column, e. g. „crmLinkState“ (here as number type, other columns are text). The column name must be typed in because the properties are not shown in the selection list. Useful link…
The following screenshots illustrate adding a column.
As result the state is shown in the list. „crmLinkState“ represents the sync status: 0-not synchronized, 1-pending, 2-synchronized. More properties are listed in the Outlook macro in the next section below.
Outlook macro as accelerator
The Outlook macro deletes all appointments in the main calendar which have any CRM reference property set. It is applied like this:
- Save the code below to a file.
- Press keys “Alt” + “F11” to start the macro editor.
- In prompts regarding security risks with macros allow macros at least temporarily.
- In the navigation at the module level (below project) select “Import file…” from the context menu.
- Import the file saved in step 1.
- Press “F5” to run the macro.
- Confirm the start dialog and wait until a result dialog is shown.
This is the code – maybe it can’t serve as best practice of VBA programming, but it does the Job.Download code as PDF file
Execute only when there isn’t an active CRM configuration in Outlook. Please test it before real use.