Hi there,
I hope you can help :-)
We are working in a project were we want to export several web services in order to query and insert data into/from the Dynamics NAV data structures. In particular we have complex data structures which expose dependencies between multiple objects (tables). In the web services however we can only query these objects as "flat" structures. That is if we have a Page 'Application' and another 'ApplicationDetails' then we need to make a create requests followed by a create multiple request in order to insert an application together with the respective details of this application. Our problem is that we do not know how to handle this in a transaction save way since each request to a web service endpoint is handled in its own transaction.
Thus our question is as following:
How can we insert relational data (e.g. complex data structures) into NAV from a web service in a single closed transaction? Is this generally possible using SOAP based web services ob Dynamics NAV. We are using Dynamics NAV 2013 R2.
Other options we have discussed so far are:
* Writing directly to the MS SQL database that is used by Dynamics NAV.
The problem that we see here is that we cannot detect handle the 'lost'
update problem.
* Writing a code unit web service which revieves and returns an XMLPort. We am currently not sure if this is even a viable solution, our NAV developers have several concerns with this solution. As I understand it XMLPorts are intended for Bulk imports and the data is not checked for correctness and could possible overwrite data in Dynamics NAV if wrong values are sent.
Thanks in advance
*This post is locked for comments