Testing the application
In order to test the application for the two described scenarios (orders retrieval and order creation), our console application must receive the correct defined parameter (READ
, CREATE
) at startup.
Let's learn how to test the application by performing the following steps:
- To do so, right-click on the solution name, click Properties, and then choose Debug. In the Debug window, you can specify the startup parameters:
- Let's test the application by passing the
READ
parameter as input. - The application code has to retrieve all the sales orders for
Customer No. = 10000
(Cannon Group SpA
) and this is the situation that we have on NAV: - If you place a breakpoint (by pressing F9) after the lines that calls the NAV web service, you can see the retrieved records in the Debug window:
- The final output on the console shows you the details for all the retrieved sales orders:
- Now change the application startup parameter and use
CREATE
in order to call the function for creating...