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
EnableConnector
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
So
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










Konstantin
February 22, 2012
Hi Ben,
This is really good instruction and very easy to follow it.
Only one thing which better you know before you’ll facing extra problems with Integration.
If you saw in my instruction, instead “Disable/Enable Connector” to publish new Web Services, I’m doing couple extra steps to do the same manually.
And Here is the reason:
When you re-enable Connector in Marketing Setup, system update “on-modified” field for ALL existing record in “Integration Record” table (5151).
As result, Connector will start immediate COMPLETE resyncronization for all data.
I had this situation for client hwo has 145000 Customers and it took more than two day to resync only one Map (during this process connector become wery slow).
So, I would suggest think twice before re-enable Connector, especially for Production Environment.
Cheers,
Konstantin
Hosk
February 22, 2012
Hi Konstantin
that’s an excellent piece of advice, I haven’t had to update the connector with a large number of users.
I will certainly keep that in mind.
good to see comments from other connector users. Your blog is excellent by the way, I hadn’t noticed it before.
bzalloua
June 20, 2012
Would you recommend doing this for credit memos as well or just use negative invoices? I dont know enough about NAV to know the implications of both options. I would prefer to integration both invoices and credit memos into the one CRM Invoice entity (credit memos come in as negative) but not sure if you can do that with the adapter??? It would make reporting in CRM easier if it is one entity. Or would the better way to do it is two have a custom entity for credit memos and then use SRS to build custom sales reports in CRM?
Any assistance would be appreciated…