Upgrading to Dynamics NAV 2018 from Dynamics NAV 2013 or Dynamics NAV 2013 R2

Original URL…

If you want to upgrade a customer’s database from Dynamics NAV 2013 or Dynamics NAV 2013 R2, you may have noticed that the latest Dynamics NAV 2018 cumulative update does not have a direct path to upgrade from these earlier versions.

The solution is to upgrade to Dynamics NAV 2018 Cumulative Update 2, and then upgrade to the latest Dynamics NAV 2018 cumulative update.

For more information, see Upgrading to Dynamics NAV 2018, which has been updated accordingly.

We hope this helps those of you who have been confused about Dynamics NAV 2018 Cumulative Update 3, and we apologize for the experience you had. Going forward, please use the processes outlined in Upgrading to Dynamics NAV 2018.

Generate Symbols in a Modern Development environment with Microsoft Dynamics NAV 2018

Original URL…

With the general availability of Microsoft Dynamics NAV 2018 in the first week of December 2017, the new and Modern development environment experience becomes more and more used by developers; side by side with the C/SIDE development environment.

Working with a standard CRONUS database is pretty easy, while every developer would like to give it a spin with their own customized database. In this scenario, it is paramount to have the appropriate symbols generated in order to be successfully pulled out by AL Extension command in Visual Studio Code and develop a custom extension against a proper customized source database.

Installing CSIDE Development Environment side by side with Modern Development Environment is duly described in the docs, as well as how to generate / re-generate symbols. For more information, see https://docs.microsoft.com/en-us/dynamics-nav/developer/devenv-running-cside-and-al-side-by-side.

Here are a few tips that can be helpful when generating symbols.

NAV 2018 and related environment best videos

Original URL…

NAV 2018 What’s New & New Technology – Fast Tracks

https://www.youtube.com/watch?v=jhd1vPyS1Vk

NAV 2018 What’s New

https://www.slideshare.net/RobertoStefanetti/nav-2018-whats-new

OTHERS

What’s new in Microsoft Dynamics NAV 2018 – A Community Perspective

https://www.youtube.com/watch?v=wK4-hRpoBlQ

NAV 2018 What’s New & New Technology – Fast Tracks

https://www.youtube.com/watch?v=jhd1vPyS1Vk

What’s new in Microsoft Dynamics NAV 2018 Tenerife

https://www.youtube.com/watch?v=Iy3G1p6ASbw

NAV 2018 What’s New Video ON DLP (Dynamics Learning Portal)

*** Learning Portal Access is required

 

Microsoft AL & Vs Code

Install Visual Studio Code With Al Compiler

https://www.youtube.com/watch?v=aeE-C3z_qkI

Dynamics NAV – Getting Started With Visual Studio Code

https://www.youtube.com/watch?v=d2GoSQUCuxE

AL in Visual Studio VS Code for Those Who are Still Afraid (NAV)

https://www.youtube.com/watch?v=LC10s7lJIkg

Inside AL for Visual Studio Code | Where are we

https://www.youtube.com/watch?v=xjceqM6V7BM

Visual Studio Code – Getting Started with Git(Hub)

https://www.youtube.com/watch?v=NTY5VELbCWI&list=PLhZ3P-LY7CqmxLpyVIPHFYqdqZwuhWQCW

How to create new AL project in VS Code and connect it to NAV

https://www.youtube.com/watch?v=FGZzrMpMSL8

Visual Studio Code Building Publishing and Debugging AL Projects

https://www.youtube.com/watch?v=hpZcdqx0udA

How to create new AL project in VS Code and connect it to NAV

https://www.youtube.com/watch?v=FGZzrMpMSL8

Dynamics NAV – C/AL vs AL – Spot the Differences

https://www.youtube.com/watch?v=EqCxrxR9f3Y

Invoking Azure Functions from AL in Visual Studio Code

https://www.youtube.com/watch?v=Wp13-nfVoEg

NAV TechDays 2017: Rock ‘n Roll with VSCode

https://www.youtube.com/watch?v=ngEkLrmQZzA

 

POWERSHELL & MULTITENANTS

PowerShell Fundamentals for Beginners

https://www.youtube.com/watch?v=SVbxinylHgE

How Do I Create PowerShell scripts for Microsoft Dynamics NAV 2013 R2

https://www.youtube.com/watch?v=hycuQjVgf1o

PowerShell 101 by Waldo for Microsoft Dynamics NAV

https://www.youtube.com/watch?v=c74Lb7BMyn0

Using PowerShell with Microsoft Dynamics NAV Part 1

https://www.youtube.com/watch?v=QlN6ProdaM4

NAVTechDays2013 Multi Tenancy and how it changes the NAV Developer Experience Microsoft Dynamics Nav

https://www.youtube.com/watch?v=vqxHsEIoH6o

Migrate from Multiple Companies to a Multi tenant Architecture in Microsoft Dynamics NAV 2013 R2

https://www.youtube.com/watch?v=Qrww95Ul7gg

 

DOCKER

Docker 101: Introduction to Docker

https://www.youtube.com/watch?v=V9IJj4MzZBc

Docker Cloud Overview

https://www.youtube.com/watch?v=-Mv6YXrmAzU

Docker and Dynamics NAV – Practical Use Cases

https://www.youtube.com/watch?v=8g82bh5sVTU

NAV TechDays 2017: Easier and DevOps-friendly NAV environments using Docker / Windows Containers

https://www.youtube.com/watch?v=9c5Yl51yXb8

Dynamics NAV 2018 Docker Install

https://www.youtube.com/watch?v=2vXFurYgFQE

 

GIT & GIT HUB

Git 101 – The Basics

https://www.youtube.com/watch?v=tDlHCr70WUs

Visual Studio Code – Getting Started with Git(Hub)

https://www.youtube.com/watch?v=NTY5VELbCWI

Using Git and GitHub

https://www.youtube.com/watch?v=8olbR_Xtg2Q

 

MICROSOFT COGNITIVE SERVICES & AI

Get started with Microsoft Cognitive Services

https://www.youtube.com/watch?v=f4XBxNuEifQ

Deep Dive into Azure Cognitive Services

https://www.youtube.com/watch?v=9Nhg469RVc4

Cognitive Services and AI Overview

https://www.youtube.com/watch?v=UNzZKqDj_mg

 

APIs

NAV TechDays 2017: Creating great API’s

https://www.youtube.com/watch?v=d9jMAnYB6qk

How Do I: use the time series API in Microsoft Dynamics NAV 2017?

https://www.youtube.com/watch?v=8TgsPFz0EAw

Microsoft Azure API Management in under 5 minutes

https://www.youtube.com/watch?v=pMybbdNEeDU

New Wizard in Report Builder for Dynamics NAV 2018

Original URL…

Trying to create a new report in Dynamics NAV 2018, I got an error opening the layout.

Being lazy as I am, I just switched to Report Builder instead of installing the new Visual Studio 2017.

Big was my surprise.

The layout was changed and wizards have been added for Tables, Matrixes and Lists.

The table wizard first lets you select the dataset, then the New Table Wizard appears:

Then Clicking Next, giving this:

Ending up with this:

Does anybody remember the classic report designer???

Configuring Visual Studio Code to Use Modern Development Environment with Dynamics NAV 2018

Original URL…

After installing Dynamics NAV 2018, I want to configure Visual Studio Code with Dynamics NAV to use new Development tool.

Before we start lets verify few things and update accordingly.

NDE-1

You can download VS Code from here:-Click to download Visual Studio Code

Install and Launch the Visual Studio Code.

Now Click View -> Extensions.

NDE-2

Click on … to open the extension menu.

Click on Install from VSIX

NDE-3

You can find VSIX file on the installation medium path:

“ModernDev\program files\Microsoft Dynamics NAV\110\Modern Development Environment”

or in the

“C:\Program Files (x86)\Microsoft Dynamics NAV\110\Modern Development Environment”

NDE-4

This will install AL Language Version 0.12.15355

NDE-5

Once the Extension installation is complete, follow below steps

Press Alt+A, Alt+L to trigger the Go! Command

NDE-6

Enter Project Name and Press Enter

NDE-7

Choose “Your own server”

Once you select the “Your own server” you will see a code like below in the “launch.json” file.

NDE-8

Update the information to look similar to below:-

NDE-9

I have updated my ServerInstance as DynamicsNAV110 (you check your instance name if changed while installing server)

I have updated my Authentication as Windows (I am using Windows authentication update what yours use accordingly)

I have added Port as 8049 (please check and use accordingly you are using the port, if using default 7049 then this step not required)

Now save your File. And Press <CTRL + F5>.

NDE-12

Enter your Credentials.

The server url and the web client url are assumed to be the same. That is not the case. The two settings we talked about above, the server url and the developer port number, are the only settings you need in the launch.json.

When VS Code publishes the extension to the NAV server, the NAV server returns the web client url as a response. This url is then opened in the browser. No setting needed in the launch.json at all.

The NAV server reads that setting from the Web Client Base Url server setting.

NDE-13

NDE-11

Your Extension is published, you can verify as below:

NDE-10

Now you are good to go with developing your Extensions using New Modern Development Tool using AL.

AL Extensions: Importing and Exporting Media Sets

Original URL…

One of the things that has changed when you are building V2 extensions for a cloud environment is that you cannot access most functions that work with physical files.

This presents a bit of a challenge when it comes to working with the media and media set field types, as the typical approach is to have an import and export function so that a user can get pictures in and out of the field.

An example of this is the Customer Picture fact box that’s on the Customer Card:

WorkingWithMediaFields1

As you can see, the import and export functions in C/Side leverage the FileManagement codeunit in order to transfer the picture image to and from a physical picture file. These functions are now blocked.

So…..we have got to take another approach. Enter streams.

Using the in and out stream types we can recreate the import and export functions without using any of the file based functions.

An import function would look like the following. In this example, the Picture field is defined as a Media Set field.

local procedure ImportPicture();
var
   PicInStream: InStream;
   FromFileName: Text;
   OverrideImageQst: Label 'The existing picture will be replaced. Do you want to continue?', Locked = false, MaxLength = 250;
begin
   if Picture.Count > 0 then
      if not Confirm(OverrideImageQst) then
         exit;

   if UploadIntoStream('Import', '', 'All Files (*.*)|*.*', FromFileName, PicInStream) then begin
      Clear(Picture);
      Picture.ImportStream(PicInStream, FromFileName);
      Modify(true);
   end;
end;

The UploadIntoStream function will prompt the user to choose a local picture file, and from there we upload that into an instream. At no point do we ever put the physical file on the server. Also note that the above example will always override any existing picture. You do not have to do this as media sets allow for multiple pictures. I’m just recreating the original example taken from the Customer Picture page.

For the export we have to write a bit more code. When using a Media Set field, we do not have access to any system function that allows us to export to a stream. To deal with this all we need to do is loop through the media set and get each of the corresponding media records. Once we have that then we can export each of those to a stream.

That would look like this:

local procedure ExportPicture();
var
   PicInStream: InStream;
   Index: Integer;
   TenantMedia: Record "Tenant Media";
   FileName: Text;
begin
   if Picture.Count = 0 then
      exit;

   for Index := 1 to Picture.Count do begin
      if TenantMedia.Get(Picture.Item(Index)) then begin
         TenantMedia.calcfields(Content);
         if TenantMedia.Content.HasValue then begin
            FileName := TableCaption + '_Image' + format(Index) + GetTenantMediaFileExtension(TenantMedia);
            TenantMedia.Content.CreateInStream(PicInstream);
            DownloadFromStream(PicInstream, '', '', '', FileName);
         end;
      end;
   end;
end;

We use the DownloadFromStream function to prompt the user to save each of the pictures in the media set. As in our first example, there are no physical files ever created on the server, so we’re cloud friendly!

You may notice that I use the function GetTenantMediaFileExtension in the export example to populate the extension of the picture file. Since the user can upload a variety of picture file types, we need to make sure we create the file using the correct format.

The function to do this is quite simple, however there is no current function in the product to handle it, so you’ll have to build this yourself for now. Hopefully in the near future this function will be added by Microsoft.

local procedure GetTenantMediaFileExtension(var TenantMedia: Record "Tenant Media"): Text;
begin
   case TenantMedia."Mime Type" of
      'image/jpeg' : exit('.jpg');
      'image/png' : exit('.png');
      'image/bmp' : exit('.bmp');
      'image/gif' : exit('.gif');
      'image/tiff' : exit('.tiff');
      'image/wmf' : exit('.wmf');
   end;
end;