Dynamic Connector – When new/custom tables won’t add web services

I have been working on a Dynamic Connector upgrade and one of the steps in the upgrade is you have to apply a hotfix.  These hotfix is for the Integration of Countries/Regions hotfix.

I think this was to fix a problem that occurred because in NAV you have a countries/region lookup and this basically just converted to a field in CRM.  sometimes this value was to big for the field in CRM.

So the hotfix meant changing the CodeUnit 5150 and adding in some lines to add the Countries/Regions.

I probably need to explain how (in my mind anyway) the Dynamic Connector works.  In NAV the Pages are used to create Web Services and these web services are used by the connector to read/write data to/from NAV.

When you tick the Enable Connector button in the Marketing Setup it kicks off the codeunit 5150 and this creates and publishes the web services   So when applying the new hotfix the code changes should have run when you ticked/unticked the enable connector button.  The changes should have added a new web service called Integration Countries/Regions.

You can see the web services by pasting the url from the adapter settings, with Services added onto the end

http://navserver:7047/customerName/WS/Services

or by opening NAV classic –>Administration–>IT ADministration–>General Setup–>Web Services

or by typing Web Services in NAV 2009/2013

Above you can see the Integration Countries/Regions has been added but the problem I was experiencing was after I made the changes to the code unit and unticked/ticked the enable connector button, it was adding in the new web service.

Something seemed to not be working because usually when you untick the enable connector button it clears all the web services.  One possible solution was that maybe someone else was logged onto NAV.

Anyway the way I got around this was to add the web services manually.

You can go to web services in NAV and add#

Object Type       Object ID       Service Name                                   Published
Page                     10                   Integration Countries/Regions      Yes

You will need to add the values above.  You will also need to add a row to the Integration Page Table (5150)

Service Name Source                     Table ID Page ID Published
Integration Countries/Regions      9             10     Yes 

If you then restart the NAV web services (just to make sure) You should be up and running.

You might sometimes experience a similar problem when adding in custom tables into the Connector

Dynamic Connector – Missing Icon

Sometimes you end up installing, uninstalling the Dynamic connector lots of times, especially in the bad old days where the connector would often forget your maps when you updated them.

Sometimes this can lead to the icon missing, I will also add they should create their own logo (BRAND IT)

I know it’s not a big deal and it’s really worthy of a blog post but it was really annoying me and it looked awful on a customer site.

if you click the change icon button it will pop up this path

%SystemRoot%\Installer\{99B04600-CB97-4A17-8175-AE7B17A52E82}\GPLogo

to find the icon you need to replace %SystemRoot% which is refers to the directory where you installed Windows.  Mine is C:\Windows but I guess you could be radical and named the drive something else (is that even possible!).  You should end up with something like this

C:\Windows\Installer\{99B04600-CB97-4A17-8175-AE7B17A52E82}\GPLogo

A word of warning you might not be able to just copy and paste the line above because your Dynamic Connector installation could have a different guid.  Although oddly I have two installations with the same guid (but on different machines).

[NAV Enumerated Values to Picklist] has encountered an error while processing key [Countries_Regions]. Sequence contains no matching element

If you get this error message in the NAV connector for the enumerated maps

[NAV Enumerated Values to Picklist] has encountered an error while processing key [Countries_Regions]. Sequence contains no matching element

This means you haven’t read the install documentation correctly (don’t ask how I know this!!) and you haven’t applied a hot fix.

Basically between version 1 and version 2 of the connector they added in a new map to the enumerated types, this was probably because I think the countries field used to cause problems when mapping, especially when a user would type in a massive long value.

You need to run through this hotfix

http://support.microsoft.com/kb/2721512

You basically add a few values to the integration code unit.

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 – 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)

http://www.nav-connector.com/

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.

http://blogs.msdn.com/b/dynamicsconnector/

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).

Dynamic Connector – Stop, Step back and start again logically

I had a very frustrating last few hours, I was having a date format error with the connector.

I was mapping Job to Contract and Job Planning Line to Contract Line.

The Job to contract was working perfectly and the dates coming across without any problems, unless I had forgotten to a put a date in.

Then when I was doing the planning line to Contract line I was getting odd date format errors.  I couldn’t understand why the dates were not always working.

I thought it might be the fact that CRM was in a US date format and NAV was in UK.

I then tried to hard code the date but even this was working, now I was really stumped.

I remember reading about a development team who had a card board cut out called Alan.  When they were having problems and were stuck or extremely frustrated they would get Alan the cardboard cut out and then talk and walk him through the problem they were having.  This action of explaining the problem to someone would often help the developer to understand the problem and find out they were doing something stupid.

unfortunately or perhaps fortunately I had a colleague working with me who said add that contract line in CRM.

When I tried to do this I then found out that CRM complained about the date, hmmm maybe this isn’t a date format problem.

I then realised that I had been putting in developer date e.g.  a load of random key presses to get rough values into boxes.

What I was basically trying to do was put in a start and end date outside of the Contract start and end dates.

So the problem was nothing to do with the connector and down to me putting in random dates.

It can be tricky to think problems are always because of the connector but when you have data which isn’t syncing then you should check you can put the date in CRM or NAV to see that it’s actually valid.

CRM/NAV Connector – State Code or status code is invalid

I was getting the error above when trying to add an order in CRM

the reason I was getting this error because I was using the service user to try and add records into CRM 2011.  This won’t work because the service user can only create/modify records using the SDK.

This is a new edition to the Connector for Microsoft Dynamics, so watch out.

Also once you have set the service user you cannot unset him easily.  You can change this but I’m afraid you are moving into the realms of unsupported changes.

if you try to change the service user by running the CRM configuration utility again with a different user you will set up two users who can’t create orders and yes I did find this out the hard way.

Basically there is a field on the SystemUserBase table called IsIntegrationUser .

When a user is used to run the CRM config utility it will set this value to true and assign the user the Dynamic Integration security role.

To unset you a user you need to set the IsIntegrationUser field to false

as an alternative and much safer method you could show the field on the user form and then set the value on there.

Once you have done this you can then sign in as that user and start using CRM again.

This is all well documented in the installation guide but for those of you who haven’t read it for a while it’s well worth remembering.

Don’t use your CRM user to run the CRM config utility in the connector