Posted on March 9th, 2011 3 comments
While working on a recent integration between NAV 2009 and CRM 2011 for a client I came across the following error when trying to run the default “NAV Customer Card to Account” mapping.
Inner Exception: Requested value ‘Customer_No’ was not found.
This took me a long time to work out so I have documented the fix below however please make sure that you read the rest of this article to determine if your situation is exactly the same. The client’s NAV database I was trying to integrate was from NAV 2009 SP1 however support for the connector was not added until NAV 2009 R2 so the database was missing a few required tables. I had imported these which were tables 5151 & 5150, Codeunit 5151 & 5150 and XMLport 5151 & 5150 and I had enabled the connector from the marketing setup table. This populated everything correctly and enabled the web services which allowed me to start the integration and get to the point where this failure was occurring. After a little research I found that you could browse to the web service URL and view the pages that were being shared on the web service. I did this for an integration that worked using the test database in the same environment and also for my integration which was failing and I found the results shown in screenshots below.
You will see in the 2nd screenshot from the working NAV Server that there is the field “Customer_No” at the bottom. In the NAV server that wasn’t working and reporting the error that field isn’t present and that’s whats causing the problem. If you want to check this on your own server you can bring up a list of the web services by going to http://localhost:7047/DynamicsNAV/WS/Services on your NAV server. You should then see a list of the available web services and you want to look for the one ending “Page/Integration_Ship_to_Address”. If you copy the full url which should be something like “http://localhost:7047/DynamicsNAV/WS/Page/Integration_Ship_to_Address” and browse to it you will then see something similar to the screenshots above and you can check for the existence of “Customer_No” in the web service.
Now the explanation on how to check this and verify you have the same problem has been done let’s get on to actually fixing it:
- Open Microsoft Dynamics NAV Classic with Microsoft SQL Server
- Locate and open the demo database that is shipped with NAV 2009 R2. This should be in your installation media.
- Once open go to Tools>Object Designer
- Find page 300 “Ship-to Address” and go to File>Export. Save the file to your computer.
- Close the demo database and open your own NAV database.
- Go to Tools>Object Designer
- Go to File>Import and find the file you saved when you exported the table.
- Press ok to the dialogs and the table should now be imported/merged with your existing table.
- Refresh the web service URL posted earlier and you should now also see “Customer_No” on the installation that was not previously working.
- Re-run the integration map and it should no longer complain of the error.