When using DotNet data type in NAV C/AL we normally lookup a sub type to use. When we do the result can be something like
Newtonsoft.Json.Linq.JObject.'Newtonsoft.Json, Version=220.127.116.11, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
Then, what will happen when moving this code from NAV 2016 to NAV 2017 and NAV 2018. The Newtonsoft.Json version is not the same and we will get a compile error!
Just remove the version information from the sub type information.
And NAV will find the matching Newtonsoft.Json library you have installed and use it.
This should work for all our DotNet variables.
I just uploaded a SQL bacpac to AzureSQL. This I have done a number of times. Connected my service to the SQL database and tried to start the service.
This time I got an error. Looking in Event Viewer I can see.
The following SQL error was unexpected:
Change tracking is already enabled for database '2018-IS365'.
ALTER DATABASE statement failed.
IF NOT EXISTS (SELECT * FROM sys.change_tracking_databases WHERE database_id=DB_ID('2018-IS365')) ALTER DATABASE [2018-IS365] SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 10 MINUTES, AUTO_CLEANUP = ON)
I looked into the SQL database, and sure enough there was a line in sys.change_tracking_databases table. The problem was that in that table the [database_id] was equal to 48 while
resulted in 49. Hence the error and my service tier failing to start.
To remove the change tracking from the database I executed (found here)
DECLARE @SQL NVARCHAR(MAX)='';
SELECT @SQL = @SQL + 'ALTER TABLE ' + s.name + '.[' + t.name + ']' +
' Disable Change_tracking;'
FROM sys.change_tracking_tables ct
JOIN sys.tables t
ON ct.object_id= t.object_id
JOIN sys.schemas s
ON t.schema_id= s.schema_id;
EXEC sp_executesql @SQL;
ALTER DATABASE [2018-IS365] SET CHANGE_TRACKING = OFF;
The service tier will take care of turning the change tracking on again when it starts. You might need to repeat these steps if restarting the service tier.
According to Microsoft a fix is in the pipeline and likely ships in CU2.
Here we go.
The NAV on Docker environment we just created can be used for the task at hand. I have an Extension in Dynamics 365 called G/L Source Names.
I need to update this Extension to V2.0 using AL. In this video I go through the upgrade and conversion process using AdvainaGIT and Visual Studio Code.
In the first part I copy the deltas from my Dynamics 365 Extension into my work space and I download and prepare the latest release of NAV 2018 Docker Container.
Using our source and modified environments we can build new syntax objects and new syntax deltas. These new syntax deltas are then converted to AL code.
It has become obvious that the future of AL programming is in Visual Studio Code.
Microsoft has made a decision to ship all their releases as Docker Containers.
The result of this is a development machine that does not have any NAV version installed. I wanted to go through the installation and configuration of a new NAV on Docker development machine.
Here is what I did.
I installed Windows Server 2016 with Containers. The other option was to use Windows 10 and install Docker as explained here.
After installing and fully updating the operating system I downloaded and installed Visual Studo Code.
After installation Visual Studio Code detects that I need to install Git.
I selected Download Git and was taken to the Git download page.
I downloaded and installed Git with default settings.
To be able to run NAV Development and NAV Client I need to install prerequisite components. I copied the Prerequisite Components folder from my NAV 2018 DVD and installed some of them…
Let’s hook Visual Studio Code to our NAV 2018 repository and install AdvaniaGIT. I first make sure to always run Visual Studio Code with administrative privileges.
Now that we have our AdvaniaGIT installed and configured we can start our development. Let’s start our C/AL classic development. Where this video ends you can continue development as described in my previous posts on AdvaniaGIT. AdvaniaGIT also supports NAV 2016 and NAV 2017.
Since we are running NAV 2018 we can and should be using AL language and the Extension 2.0 model. Let’s see how to use our repository structure, our already build Docker container and Visual Studio Code to start our first AL project.
So as you can see by watching these short videos it is easy to start developing both in C/AL and AL using AdvaniaGIT and Visual Studio Code.
My next task is to update my G/L Source Names extension to V2. I will be using these tools for the job. More to come soon…
Last November I was in Antwerp attending NAVTechDays. During the pre-conference workshops I hosted a workshop on Json & NAV.
All the exercise code, both for CAL and AL you can download here -> NAVTechDays2017-JsonMeetsNAV
We where using the Development Preview image. Try your own by following http://aka.ms/navdeveloperpreview.