Tuesday, May 30, 2006

Enabling Tracing in Microsoft CRM 3.0

OK, so you need to turn on CRM Outlook Synchronization Tracing because the darn outlook client is acting up. This requires registry key changes that ARE NOT DIRECTLY SUPPORTED BY MICROSOFT (These keys are not documented anywhere). Make these changes at your own risk. Make sure you back up the CRM client registry key before continuing. HKCU->Software->Microsoft->MSCRMCLIENT.

Copy the following into a text document:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\MSCRMClient]

"TraceDirectory"="c:\\crmtrace"

"TraceEnabled"=dword:00000001

"TraceCategories"="*:Verbose"

"TraceCallStack"=dword:00000001

"TraceRefresh"=dword:00000001

"TraceSchedule"="Hourly"

Put whatever local drive location you wish in the TraceDirectory key. Makes sure this directory exists on the client machine.

Save the document with a “.reg” extension. The will make it a registry merge file. Copy this file to the client machine you want to trace. Double click on the file and choose to merge the registry values into the registry. CRM outlook client tracing is now setup on that client computer.



Restart outlook. The synchronization process should start again. Open windows explorer and navigate to the directory you specified in “TraceDirectory”. You should now see log files in this directory (if you don’t see them right away, wait a few seconds). Let these files grow for a little bit (a minute or so) then open the log file that was growing. You will see verbose tracing about the synchronization process. Look for repeating error sections. You will probably notice that the error is around a particular record in CRM. Look at the XML for that record. Look for thing like:



Malformed XML
Bad character data
Malformed email addresses
Malformed web addresses


If you see anything unusual, fix the record either using CRM (preferred) or directly in SQL (not supported by Microsoft). Re-run the synchronization process and re-examine the log files. Repeat until you get the process working correctly.

0 comments: