If you import Data over SDK Webservices you are able to import trailing spaces. These trailing spaces are normally trimmed from the UI and never got to the database, but over the SDK there is no trimming.
If you synchronize contacts with outlook, Outlook parses the fields and trims the spaces. So this contact is marked as dirty and will be synchronized back to CRM. CRM does not update the data and within the next synchronization we get the trailing spaces re-synced again. The sync could last very long and impact the load on the server. The contacts that you modified manually are synchronized fine and the data is stored in the database with no trailing space and this contact will only be re-synced if something changes.
A script that first adds a trailing string that we will remove later and with the trailing string a real change, the data is synced as expected. The below is sample script to add a trailing string to addressfields street postalcode and city
The BusinessAddress File is a little bit special because BusinessAddressstreet and the other fields are virtual and parsed from outlook on the fly that’s why I selected the address field as example but you can do this any other field to.
When you now have a look on your contacts you will see all the trailing “(remove)” strings. Sync multiple times with CRM until no contacts are synced. Now it’s time to remove the “(remove)” string and would do the below.
Check your contacts and see that the trailing “(remove)” is removed. Sync again multiply times until no contacts are synced anymore and now you have completed it.
If you have a lot of users may be you what to automat this script as add_remove.vbs and remove_remove.vbs. and write a Batch such as:
Download the crmoutlooksync.exe from the codeplex project here: http://crmoutlooksync.codeplex.com/
Best Regards Dynamics CRM Team