Hi folks!!!
We are working with new Dynamics NAV API… all works well when we do POST, GET, PATCH and DELETE. I’ve created a new Page API for journals, because the standard journal API si very limited (it only allows G/L accounts, and only can read/create/modify/delete, but not posting).
I’ve been searching for a Page API to post a sales invoice… observing current Page API for sales invoice (5475 Sales Invoice Entity), I’ve seen a few functions classified as “External” (visibility) and “ServiceEnabled”. In fact, when I look for API metadata in:
myServer:myOdataServicePort/…/$metadata
The system shows my, all data definitions for the API, including those functions defined as “External” and “ServiceEnabled” in their properties… in the case of sales invoice, I can see 5 actions:
<Action Name="Post" IsBound="true">
<Parameter Name="bindingParameter" Type="Microsoft.NAV.salesInvoice" />
</Action>
<Action Name="PostAndSend" IsBound="true">
<Parameter Name="bindingParameter" Type="Microsoft.NAV.salesInvoice" />
</Action>
<Action Name="Send" IsBound="true">
<Parameter Name="bindingParameter" Type="Microsoft.NAV.salesInvoice" />
</Action>
<Action Name="Cancel" IsBound="true">
<Parameter Name="bindingParameter" Type="Microsoft.NAV.salesInvoice" />
</Action>
<Action Name="CancelAndSend" IsBound="true">
<Parameter Name="bindingParameter" Type="Microsoft.NAV.salesInvoice" />
</Action>
The question is: how can I access to these actions? How can I post a sales invoice from API using “Post” action?