December 16, 2018
You are here : Solutions  >  Developer Tools  >  ebComposer UBL  >  ebComposer UBL code examples
Code examples

Implementing in .NET or any COM compliant client is easy. Examples are given here for:

C# code sample

Below is a sample code for creating an UBL 2.0 invoice document using C#. Usage in .NET 2.0, 3.5 and 4.x is supported. Please note, that although the Profile Identifier used here is the one which defines the Basic Invoice Only profile, please note that the code below does not create a NESUBL compliant document according to this profile.

In .NET 3.5 and .NET 4.x object initializers are fully supported.




Dynamics NAV code sample

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.

 

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