Navision Code Sample

.NET Code Sample for ebComposer UBL

Below is a sample code for creating an UBL Invoice Document from Navision (Microsoft Dynamics NAV). Althought the Profile Identifer used here is the one used to identify the Bacic Invoice Only profile, please note that the code below does not create a NES Compliant document according to this profile.

First the invoice and invoiceLine variables are set either locally or globally in the Navision Codeunit variable declarations.

Setting the variables of the Navision codeunit.


Then here is the code that writes out the invoice to a file.

Navision code for wirting out an UBL 2.0 Invoice document