Ship-to-Address - Webservice Integration.

Hi,

I am new to Dynamics NAV2009 werservices integration with C#, I was working on standard web services example provided by Microsoft http://msdn.microsoft.com/en-us/library/dd355316.aspx on how to expose a page as a Web service and how to manipulate data from that page, (basic example explain how we can created/update/delete customer in Dynamics NAV) Based on this example i tried to insert Ship-to-Address into Dynamics NAV from C# for a Customer by exposing Page “300” of ship-to-address as web service. But i am gettting an Error “Customer No. does not exist.” when tring to insert new address and i am not able to find Customer No field in ship-to-address Webservice. Can any body please help me with this.

The reason for this is that the Customer Number field which is present in the shipping address table is not available at the shipping address form (page) and therefore not populated.

I’m not sure if it is sufficient to just include that field and set it to visible = FALSE or if it must be visible TRUE in order to be exposed in the web service, but give it a try.

Thanks Thomas, It works if we create an new field in ship-to-address Page, but can i achieve this with out customizing standard Dynamics NAV 2009 - ship-to-address Form/ Pages.

As far as I know, the web service only exposes the fields that are on the page. If there’s a field that you need in the web service, you have no choice but to put it on the page.

The idea behind only publishing the fields in the web is to provide a kind of security.

You could (and should) rather define your own pages and populate those as web service and just with the fields you definitely need - not populate all fields of every table.