Archive | Uncategorized

RSS feed for this section

Unix Datetime UTC

Here’s a little trick to generate a Unix Datetime in UTC. PROCEDURE DT2UnixDTUTC@81237(DtIn@81200 : DateTime) : BigInteger; VAR DtOffset@81203 : DotNet “‘mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089’.System.DateTimeOffset”; DtUtc@81206 : DateTime; Duration@81208 : Duration; TempDate@81209 : Date; TempTime@81210 : Time; BEGIN EVALUATE(TempDate, COPYSTR(FORMAT(DtIn, 0, 9), 1, 10)); EVALUATE(TempTime, COPYSTR(FORMAT(DtIn, 0, 9), 12, 8)); DtUtc := CREATEDATETIME(TempDate, TempTime); Duration […]

Json, REST and Zendesk

Many of us have been using XML and SOAP for a long time now. This time my task was to create tickets in Zendesk based on events in NAV. I soon discovered that Zendesk uses REST web services and that it talks Json…. 😯 I soon found Gunnar Gestssons blog post on “JSON meets NAV“. […]


One very cool feature in NAV2016 is the table type “ExternalSQL”. In older versions you had to use a view in SQL for each table and set the property LinkedObject. Now you don’t have to do that any more. Let’s take a look at it: Here you can see how you can use TableType, ExternalName […]

AltSearchField in NAV2016

The property AltSearchField is removed in NAV2016 but importing an object from NAV2015/2013 which had that property set will still keep the property value even though it’s not visible in the development environment. This might not be an issue until you try to rename the field that is set as AltSearchField. Then you’ll end up […]

Log your changes

From time to time we get into the situation where we need to run a batch report to update data in NAV. It’s always nice to log changes and there’s an easy way to do it by calling the standard Change Log functionality. This example blocks all Norwegian customers and writes the changes to the […]

Fixing the logo size

When you’re working with images in RDLC reports you often need to create images in a fixed size that matches the image box in you report definition. One of Clausl’s many great reporting blog posts is about a workaround to prevent unexpected lines on the image border. Clausl use the freeware Paint.NET which can be […]