Creating the NAV web service
The scope of our application is to read NAV sales orders and create new ones by invoking the NAV business logic. In order to do that, we need to publish the NAV Sales Order page as web service and use it.
Let's learn how to create a NAV web service by performing the following steps:
- Open the Microsoft Dynamics NAV RoleTailored Client and go to the Web Services page.
- Create a new record with these parameters:
- Object Type:
Page
- Object ID:
42
(Sales Order page) - Service Name:
SalesOrder
(a friendly name for our web service) - Published:
TRUE
The results are shown in the following screenshot:
- Object Type:
- When published, NAV immediately gives you the service URL (SOAP and OData). You can test if the web service is correctly working by accessing it directly via the browser (using, for example, the SOAP URL):
- If the browser prompts you to insert credentials for the service, access it by using a correctly configured user in NAV.
- Remember that in order to access the published...