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,…

Most Simple Web Service Examples to Update NAV Data from External App

In this post I demonstrate two Simple Web Service examples of updating a NAV table from an external application using SOAP Web Services. We have table “Person Test” with “Person List” and “Person Card” pages and 3 fields which look like this: And we will create a C# Console Application in Visual Studio that will…

Allocate monthly amounts considering a Start and End Date – NAV Example

Let’s suppose that you have the following entries and what you need is an algorithm that will calculate the number of periods (months) between the End Date and Start Date and allocate the amounts equally for each period. Given: Result needed: How would you do this ? In this post I present 2 ideas about…