Feb
27
2012
Today I want to talk about Fiddler2 and how to use it for resolving Integration Errors. Pretty often during integration we are receiving completely un-meaningful or confusing errors, so resolving them become a really nightmare. Here is the good example:

or

The first error is completely useless and not give you any information about real error. The second one is given you only partial information and it's actually can give you wrong direction for investigation and you can spend hours and hours with zero progress at the end(You'll see why in the end of this article).
In those cases Feddler2 is extremely useful and, probably, only one tool which can help you resolve similar errors.
So, Feddler2:
Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. In our case it will log all queries and transferred data between Connector <-> NAV and Connector <-> CRM.
Part 1. Installation.
Fiddler is freware and to install it, just enough download installation package from official site.
1. login into server where Dynamics Connector is installed.
2. Go to http://fiddler2.com/fiddler2/ and click "Downoad Fiddler" ( or "Get Fiddler!")
3. On the second page click "Install Fiddler2"
4. In "File Download - Security Warning" Dialog Box click " Run" and Wizard Instructions to complete Installation.
Part 2. Run Fiddler2.
Once Fiddler2 is Installed, we are ready to use it for catching Connector Errors.
1. To be able trace all activities from Connector, you MUST run Fiddler2 under the same account which you used for Connector Services. To check it, goto Services and double click on Connector Service:

2. Go to "Start" and SHIFT+Right Click on Fiddler2:

3. In Open Dialog Box enter credentials which you are using for Connector Service:

In open form you'll see all capturing activities from Connector:

Part 3. Troubleshooting with fiddle2.
To find actual error message, you should run Fiddler2 in "capturing" mode and resync record which generate error in Connector.
When Error occur, you'll see this line in fiddler in red.

Warning!!! Don't leave fiddler2 in capture mode too long.
So, let's see what show us Fiddler2 for Errors from above.
Error 1.
Connector show error message as "Exception occured in Microsoft Dynamics NAV".
In Fiddler2, same error event but more explainable - "There is no Integration Record withing the Filter".
This error message much more meaninful and allow me to do next step in error investigation.

Error 2.
Second error "Account with ID=... not exist" looks not difficult. But here is the issue with this particular Integration:
- Because Customers was initially synched with existing Accounts in CRM using Duplicate detection feature, They have:
NAV Integration ID <> CRM Account ID
- In Customer to Account map no one link to Account.
So, if here is no Account look up fields in map, then what is the cause this error? (one more weired detail - even if error occur, record updated successfully in CRM).
Let see what fiddler can show us:

As you can see on screenshot, issue actually not with Account entity. During update Account, Connector trying update Customer Address for this Account at the same time and failed because, as I described above, NAV Integration ID <> CRM Account ID.
This is out of box feature(Customer Address Integration) and I cannot turn it of. But I'm not really worry about this error, because my Accounts updated correctly and I don't care about Customer Address Entity.
So, if you going to work with Connector, I would strongly recommend you start using Fiddler2 as soon as possible and it will save you incredible amount of time.