CRM/NAV Connector – How to map a custom table not included in the standard maps

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

12 thoughts on “CRM/NAV Connector – How to map a custom table not included in the standard maps

  1. Konstantin February 22, 2012 / 2:35 pm

    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.



    • Hosk February 22, 2012 / 2:50 pm

      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.


  2. bzalloua June 20, 2012 / 4:01 am

    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…


  3. Phil March 28, 2014 / 10:32 am

    NAV 2013 R2 – change FORM to PAGE in order to complete. Top notch Dr. Hosk.


  4. Billy August 5, 2014 / 12:29 pm

    Hi Ben,
    do you know if it is possible to integrate/synchronize custom entities with the connector? With custom entities I mean, entities built from external partners and not included in standard NAV setup. I’ve tried with nav 2009 R2, I followed your instructions and i can see “myCustomPage” in the list of the entity that I wish to integrate (your last screeenshot). I tick it and hit Finish. As soon as the entitiy is evaluated in the next step, I get an error and if I check the log I get “Multiple lines sections are not supported”.. Any advice? Thank you in advance!


    • Hosk August 5, 2014 / 12:38 pm

      Yes you can integrate custom entities. I think I have blog post somewhere on that subject and it’s not easy (nothing with the connector is)

      Mutltiple lines means somewhere in your mapping you are trying to map an entity which has 1 to many entity on it. Basically the connector can only map 1 CRM entity to 1 NAV record.

      sorry I couldn’t be more helpful but happily I have used the connector for a couple of years

      Good luck


      • Billy August 5, 2014 / 1:01 pm

        wow! Thank you for your quick reply. I get the error in the Nav adpter configuration, after I hit the finish button, so I am still not mapping anything. 😦 . Do you think that i can not map an entity wich has 1:n entity on it? it is a big limitation, or? Do you have any idea about some work around? Again, thank you very much


  5. Bill B September 8, 2014 / 9:20 am

    Check that the Page you are using in NAV for the web service has a PageType of Card (not List)


  6. Paul Farrington Burnett March 16, 2016 / 11:10 pm

    Followed the steps for NAV 2015 but there it does not allow SetupWebServicePages(Page::”Vendor Card”,DATABASE::Vendor); Everything else is the same but not able to get intergration working. Any ideas?


    • Shina Aina January 30, 2017 / 4:22 pm

      Hi Paul, did you manage to resolve this because I’m facing a similar challenge with NAV 2015


  7. shahzeb khan May 24, 2017 / 7:01 am


    i am connectiong NAV with CRM, while mapping, i am facing the problem that my three entity from NAV (SALES ORDER and SALES INVOICE etc) are not getting mapped with CRM, If i skip them then i is working fine. So, what can be the problem?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.