If you use the connector regularly you will eventually want to map a custom table which isn’t covered by the standard maps. To do this in CRM side is easy, you run the configuration utility and add the new entity but to do this in NAV requires a bit more work.
The connector works (as I understand it) by publishing tables/pages using a web service which is used by the connector to pass information from and to NAV.
The connector catches these web service calls in the code unit 5150 – intergration management. If you were to open this up you would see the tables used by the standard maps mentioned.
So I am going to run through the process of adding Job to the custom maps.
First I open NAV and the correct database and company. Then
Tools –> Object Designer –> Codeunit –> 5150 –> Design
The first function you need to change is called
You can see from the screen shot below I have also added in Site Address but that was just because I needed to do that, it’s not related to adding the Job table.
You need to copy one of the lines above, paste it into the list and then change the details so you are referencing the Job table e.g.
If you are not sure what to add and you are adding something other than a Job then the first value is the Form Name and the second value is the table name, so if you were adding Job Planning lines then it would be
SetupWebServicePages(FORM::”Job Planning Lines”,DATABASE::”Job Planning Line”);
The next function you have to change is called SetupIntegrationTables, you will need to add a new line for each table.
You might wonder why Job is not in double quotes. Double quotes are needed if the table name has a space in it, otherwise you can just put the table name in.
The next function we need to change is IsIntegrationRecord, you add a reference to the table you want to add. This function basically tells the connector you want the table to be added to the connector.
Be careful about adding a comma if the row isn’t the last value
You have finished with the code changes, close the codeunit and press yes to save and make sure the compiled checkbox is ticked.
You now need to refresh the integration webservices so your new table is added and you do this by unchecking and checking the Enable Connector checkbox which is held in Marketing Setup.
You access the Marketing Setup by going to
Administration –> Application Setup –> Sales & Marketing –> Marketing Setup
Untick the box, check the tickbox. After a bit of time you should see a new integration Web Service added to the list.
You can check this by going to
Administration –> IT Administration –> General Setup –> Web Services
You can see that the page is published and the new Integration Job Card Web Service is running.
Don’t panic if the Job Web Service doesn’t appear, first I would give it a bit of time. I would try a good old close the NAV client down and open it again (this doesn’t really do anything but it will keep you busy for 30 seconds).
Finally if you don’t see the Web Service go back and check the code changes you have made, look for spelling mistakes, putting in the form name instead of the table name, missing comma. The problem is going to be a syntax problem.
The final part of the puzzle is too run the NAV configuration utility in the Connector and tick the new Job Card entity
Open the Connector for Microsoft Dynamics
Adapter Settings –> Configure Microsoft Dynamics NAV –> Next –> fill in login details –> select Company –> tick Job Card
I think you might want to just enable the Job Card or the custom entity of your choice only on a specific integration.
hopefully the walk through above should help people add custom entities