Monthly Archives: January 2020

View the current timestamp of a record

Recently I was experimenting with code and made an error by accident. Experimenting with C/AL statements or datatypes makes me understand code and functionality better. I specified by accident RecordRef.FIELD(0). This field number doesn’t exist you think. But it gave me a result:

This code:

RecordRef.OPEN(18);
RecordRef.FINDFIRST;
FieldRef := RecordRef.FIELD(0);
MESSAGE(FORMAT(FieldRef.VALUE));

Results in:

Message in Windows Client

So I started to search for some answers. Quickly found out it was the timestamp of the record! In one of my early Nav days (already six years now) as a consultant I already knew and saw that this was a physical column in SQL for each row in a table.

The physical column timestamp is visible in SQL Server but not in Microsoft Dynamics Nav

Nav uses it for versioning as an internal mechanism so you cannot view the value by default, even if you are running the table directly from the Development Environment. There is another possibility explained by Microsoft by adding a BigInteger field to an Nav table and then select the SQL TimeStamp property:

But the code earlier mentioned accomplishes the same thing without creating an extra field. I thought it was worth sharing so maybe it will be usefull for someone.

Your program license has expired.

Recently a customer of us received a message that their license has expired. This message is shown when you connect to an Nav database from the Development Environment. The message looks similar like this:

Your program license has expired

Textual: Microsoft Dynamics NAV Development Environment
Your program license has expired.

However the customer wants to update the license with a fresh one but how to accomplish this because you can’t connect to your Nav database? The very first thing to do is to not connect to the database so that you won’t receive the message. Steps:

  • Open Development Environment and don’t connect to a database
  • Go to Tools > License Information and press Change.
  • Now select a new valid license.
  • Now connect to your Nav database and Upload the fresh license into your database.

Note: in order for the license to be effective in the Windows or Web client you need to restart all servicetiers that are connected to your corresponding database.