How to Create a Simple Json File in NAV C/AL and AL

Because I needed it today for simulating a response of a web service in a unit test and couldn’t find a suitable example over the internet, let’s see how we can create a Simple Json file in NAV C/AL. Sample test codeunit: Variables function Create SimpleJsonFile: Var Name DataType Subtype Length Yes JSonResponse DotNet Newtonsoft.Json.Linq.JObject.’Newtonsoft.Json,…

The Document Pattern and the link between Header and Lines in Microsoft Dynamics NAV

In this post I will present some important information about the Microsoft Dynamics NAV Document Pattern. A document in NAV contains a Header with common data and one or more Lines. Each line is linked to the header. Let’s have a look for example at a Purchase Order. As you can see in the bellow image, a…