How to turn on Logging for the Dynamic Connector

Sometimes you need to look at the logs of the connector because the initial error is not very descriptive and you need a few more clues.

The logs are held in an unusual folder – ProgramData, which is often hidden from browsing, so you often have to paste the folder into windows explorer.

below are the steps to start the logging and where to find the file.

You may have problems editing the Microsoft.Dynamics.Integration.Service.exe.config file and the way around this is to copy the file to another folder, make the change and then copy it back and overwrite the original.

You can get this log following these steps:

  1. Stop the Connector service
  2. Go to C:\ProgramData\Microsoft Dynamics\Connector for Microsoft Dynamics\Logs
  3. Rename the following file (new name is not important): Microsoft.Dynamics.Integration.Service.log
  4. Open the following file in Notepad: C:\Program Files (x86)\Microsoft Dynamics\Microsoft Dynamics Adapter\Microsoft.Dynamics.Integration.Service.exe.config
  5. Locate the following parameter: “Microsoft.Dynamics.Integration.TraceLog”
  6. Set the value for this parm to: 4
  7. Start the Connector service
  8. Reproduce the error
  9. read the log file C:\ProgramData\Microsoft Dynamics\Connector\Microsoft.Dynamics.Integration.Service.log

Dynamic Connector – Client Hanging when viewing log files

I had a frustrating few hours this morning when the Dynamic Connector client kept freezing, not responding before finally crashing.

I seemed to be getting the error when trying to view the log files for some of the maps.

I tried installing the Dynamic Connector on another server and I was getting the same error.

The solution to the problem (in my case) was fairly straight forward but logical.


deleting all of the Exceptions in the MapExecptions table in the MSDI database

I also deleted all the values from the Logs table as well (for good measure)

Then I re-launched the client and things were good again.

obviously be aware that if you delete the Logs table you won’t have any logs (but I can usually rack up a load pretty quickly)

Dynamic Connector works with CRM 2011 and NAV 2013

Good news the Dynamic Connector or the Connector for Microsoft Dynamics team are keeping up the good work and development on the Dynamic Connector and already have it working with NAV 2013.

I will first add I think the Connector team need to use a better name than Connector for Microsoft Dynamics because that name makes it very difficult to search for help and we need all the help we can get when using the Dynamic Connector.

The way I search for things is type the name of the software and then the question but the name they are using makes it impossible and extremely difficult to find any help.

on a positive note I think the Dynamic Connector (I’m sticking with that name now) have put a lot more effort and development this year.

  • they have written more useful blog posts
  • put videos on the blog showing how to upgrade
  • improved the functionality (filtering)
  • fixed a load of bugs in the connector

but you still have some way to go because I upgraded the connector the other week and it totally fell apart and couldn’t read half of the maps and I still haven’t installed the connector without problems.

Dynamic Connector – Web service connection errors

A few weeks ago I was getting errors connecting to the NAV webservices using the Connector.

You can read more about that here

I got round the problem by using the ip address of the server, other things you can try is the full name (usually .local at the end or something like that) or just the server or localhost if you are on the machine.

I did raise the question with the Dynamic Connector development team, who are a helpful bunch.

I have had a problem like this before and I thought I would explain what is causing this problem because you may come up agaisn’t similar issues like this in CRM, NAV and the Dynamic Connector.

The basic problem is Kerberos authentication and it’s failing.

the way I understand it is you can access the NAV webservices/crm webservices within internet explorer because you can add the webservices as a trusted site.   Adding this into the trusted sites helps the kerboros authentication, which explains why you can often access it using internet explorer.

If you can’t get any other url’s (ip address, localhost, servername, full servername) then you are going to have look at the SPN settings (Service Principal Settings).

If like me you are not sure what a SPN is, this is probably the time you start to talking to the IT experts internally and on the customer site.

I found a quick explanation about what an SPN is here

A service principal name (SPN) is the name by which a client uniquely identifies an instance of a service. If you install multiple instances of a service on computers throughout a forest, each instance must have its own SPN. A given service instance can have multiple SPNs if there are multiple names that clients might use for authentication. For example, an SPN always includes the name of the host computer on which the service instance is running, so a service instance might register an SPN for each name or alias of its host. For more information about SPN format and composing a unique SPN, see Name Formats for Unique SPNs.

Before the Kerberos authentication service can use an SPN to authenticate a service, the SPN must be registered on the account object that the service instance uses to log on. A given SPN can be registered on only one account. For Win32 services, a service installer specifies the logon account when an instance of the service is installed. The installer then composes the SPNs and writes them as a property of the account object in Active Directory Domain Services. If the logon account of a service instance changes, the SPNs must be re-registered under the new account. For more information, see How a Service Registers its SPNs.

When a client wants to connect to a service, it locates an instance of the service, composes an SPN for that instance, connects to the service, and presents the SPN for the service to authenticate. For more information, see How Clients Compose a Service’s SPN.


My basic understanding of this is you are setting up exe’s and computers to be trusted and put into a sort of list, so when a connection is attempted e.g. from the connector to a computer then if it’s on the list the kerboros authentication works.  Now my explanation could be a load of nonsense buts that how I imagine it works.

This issues are always tricky to resolve because often the IT staff won’t want to get involved and say it’s a problem with NAV/CRM/Dynamic Connector and it’s nothing to do with the IT setup.  It’s highly likely you won’t have access to the domain controller to be able to tinker with the SPN settings so you haven’t really got any choice but to keep explaining to the IT staff.

I have had days wasted trying to figure out these kind of problems and I hope your connector installations don’t suffer from this problem.


Dynamic Connector – mapping OptionStrings in NAV to Optionsets in CRM

Firstly the article post below by the connector team was extremely useful, even if it took me a while to understand where they were putting the values because they didn’t have any screen shots.  I hope the connector team write some more blog posts because the Dynamic Connector users need all the help and documentation we can get.  The article below is exactly the kind of information which should be in a manual or wiki or at least written about a year ago and is the type of information which should be shared to help people get up and running with the connector.  whilst I am asking for the things, top of the list should be for the Dynamic Connector to have it’s own forum or if it has tell me about it.

Below shows my adventure mapping an OptionString in NAV to an OptionSet in CRM, which is harder than it sounds.

Field in NAV

Correspondence Type


Hard Copy





I created a new field in CRM called

NAV Correspondence Type





So as we can see they basically have the same values

For the Contact to NAV Contact Card below is the code I had to put in.  basically a blank is shown in NAV as “_blank_”, so if the optionSet was blank in CRM (e.g. “”) I would put “_blank_”.  For some reason the values came through from NAV with an underscore e.g. Hard_Copy.

=If(EqualTo(NAV Correspondence Type\Name, “”), “_blank_”, NAV Correspondence Type\Name)


Going the other way – NAV Contact Card to Contact

The NAV Correspondence Type is hidden down the bottom.  It has a name and a value but we only want to use Name because we don’t have any way to match the values.

For this code I check to see if it’s “_blank_” and if it is just pass nothing “” otherwise we copy the name value across

 =If(EqualTo(Correspondence Type, “_blank_”), “”, Correspondence Type)

I also wanted to map a two options field in CRM to a checkbox in NAV.

In CRM the values are true and false and in NAV the values are Yes and No, they are close but not close enough to automatically map.  I have a feeling there could be an easier way to do this but I couldn’t find any dynamic examples, only hard coding examples.

NAV field

Exclude from Segment


CRM Exclude from Segment


The contact to NAV contact is shown on a picture above but here is the code

=If(EqualTo(CRM Exclude From Segment, “true”), “Yes”, “No”)


NAV Contact to Contact

=If(EqualTo(Exclude from Segment, “Yes”), true, false)


CRM 2011 – Dynamic Connector Filtering is a great new feature

Version 2 of the Connector for Microsoft Dynamics (I’m still not convinced about this name, it seems to long to me).

has a great new piece of functionality. Filtering makes upgrading worthwhile alone.

There are some other good things in V2 like the fact it installs the CRM solution for you, which means all you have
to do now is run the installer.


What is filtering.

When you create a map in the Dynamic Connector (much better name) there is a new section called Filter. In this area
you can specify lots of filters using AND functionality. This means you can now only sync records which pass your
filter criteria.

An example I recently implemented was a user wanted to only sync orders of a certain type. So I added a new dropdown
and the users would set the dropdown to a certain value – Orders in this case.

I then set a filter to only sync orders with the field value set to Orders.
This is powerful functionality and it’s easy to setup and use in the connector.

There are also a number of bug fixes in the connector so I would recommend upgrading.

The connector team have done a good job making the upgrade very easy, all you have to do is run the Connector.MSI
and it will upgrade legacy maps and running connectors.

when you open the connector which has been upgraded you will see there are two sections, CRM and CRM 2011.

The maps should work without you having to make any changes

Dynamic Connector – Excellent Dynamic Connector blog

This is a quick blog post with two aims regarding the Dynamic Connector.

The fist aim is to point you to an excellent resource for the connector.  The blog written by Konstantin is one of the best blogs on the Dynamic Connector (CRM/NAV connector as I still sometimes call it)

He has some great blog posts

The Most useful tool for troubleshooting the connector

How to include in integration custom NAV tables – Step by Step instruction

How to update Production Dynamics Connector from Development environment

Talking about good Connector resources, I should also mention the Microsoft Dynamic Connector blog, which has recently had some good blog posts and videos.

Konstantin also left a comment on one of my connector blog posts which explained something I had wondered about.  When you tick/untick the Synchronise Connector tickbox in NAV (in Marketing Setup)

Codeunit 5150 has property “Single Instance”=Yes, which mean if you run it, it will sit in memory until you close Client.
That is why “Re-activate” Connector function not working from first time properly. Every time, after you modify this particular Codeunit, you need to reopen Client to apply modifications in YOUR client (WebServices should pickup modifications immediately).