Developing the solution
Our solution is essentially composed of two parts as follows:
- The NAV business logic
- The interface layer (cloud service)
In the NAV instances of the subsidiary companies, we need to retrieve the sales shipment's data for every item:
- To do so, we need to create a
Query
object that readsSales Shipment Header
andSales Shipment Line
, and exposes them as web services (OData).The
Query
object will be designed as follows: - For every
Sales Shipment Header
(table 110), we retrieve the correspondingSales Shipment Lines
(table 111) that haveType = Item
:Note
I've changed the name of the
No.
field inSales Shipment Line
in thedataitem
field asItemNo
because the default name was used in theSales Shipment Header
field asdataitem
. - Compile and save the
Query
object (here I've usedobject ID = 50009
andName = Item Shipments
). - Now we have to publish the
Query
object as a web service in NAV (as described in the first chapters...