
Mastering Microsoft Dynamics NAV 2016
By :

There are various ways of installing Microsoft Dynamics NAV 2016 on different platforms. We still use the conventional ways, which are optimized for a better experience. Installation of Microsoft Dynamics NAV 2016 On Premise is not in the scope of this book, as it is similar to the older version and the readers are supposed to have had that experience prior to starting this book. I have pointed out the most popular and most on-demand installation scenarios.
ClickOnce is a component of the Microsoft .NET Framework. It helps to deploy a web application with just a link. The end user chooses a link to the Microsoft Dynamics NAV application installation. The link points to a shared file or a website. We can also deploy a mass installation if we want to carry out the process on multiple client systems.
The following is a list of prerequisites for this installation process:
The entire process can be understood in just a few steps, which are as follows:
The steps mentioned in the preceding section can be understood in detail as follows:
setup.exe
, and install the ClickOnce Installer tools. The files will be installed in C:Program Files (x86)Microsoft Dynamics NAV70ClickOnce Installer Tools
.Or find the folder in the NAV Installation DVD in NAV.Installation.DVDClickOnceInstallerToolsProgram FilesMicrosoft Dynamics NAV90ClickOnce Installer ToolsTemplateFilesNAVClientInstallation.html
.
You can also use File Share in order to install ClickOnce. You can follow the steps mentioned in the following section.
Following is the list of prerequisites for this installation process:
The entire process can be briefly understood in just a few steps, which are as follows:
Setup.exe
C:Program Files (x86)Microsoft Dynamics NAV70ClickOnce Installer Tools. Or NAV.Installation.DVDClickOnceInstallerToolsProgram FilesMicrosoft Dynamics NAV90ClickOnce Installer Tools
ClientUserSetting.Config
.
fileshareclickonceDeploymentMicrosoft.Dynamics.NAV.Client.application
The steps mentioned in the preceding section can be understood in detail as follows:
C:Program Files (x86)Microsoft Dynamics NAV70ClickOnce Installer Tools
or from your installation DVD.Fileshare
in your system, preferably in the C:/
drive.C:Program Files (x86)Microsoft Dynamics NAV90RoleTailored Client
folder and paste it into the Fileshare
folder:
We can also use a website to host these files, for example, http://Yourdomain/ClickOnceInstallFolder
.
The same process can be used to upgrade, using the setup file shared over the network of Windows machines:
ApplicationFiles
.
Manifest files are XML files, which are used to control all kinds of add-ins to work on all display targets.
Now the user can install the file at their end. Since the file is shared on the network, it's easy to follow the simple setup instructions, as shown in the following screenshot:
And that's it! The installation process is simplified and distributed over the network. If the process implements an Internet protocol, then it's even easier to distribute the system.
This is one of the most talked about topic in the Microsoft Dynamics Community. Most of the clients are looking forward to implement Azure machines as their System Server. We will try to explore how PowerShell can come in handy here.
Following is the list of prerequisites for this installation process:
The entire process can be understood briefly in just few steps, which are as follows:
The steps mentioned in the preceding section can be understood in detail with the following detailed steps. I have tried the Classic Portal. You can also try the new Portal; the steps will remain the same:
Copy this folder from the Installation DVD into the cloud storage: NAV.9.0.Installation.DVDWindowsPowerShellScriptsCloud
.
These files contains all the PowerShell commands which can be used for the provisioning process.
The second model uses two virtual machines, the NAV web server and service tier, and another VM for the NAV database. This is better for a system using huge databases:
From the client's perspective, both the models are same as they work in an exactly same manner on the client side.
In these steps, I will explain how we can utilize the readymade command file, which is nothing but PowerShell Scripts prepared by Microsoft for administrative purposes:
CloudHowTo
folder:Set-PartnerSetting.ps1
Update the values with the name of your subscription; here, replace MyAzureSubription
with your Azure subscription.
Provide a value for the parameter as required, and save the file.
Now we can proceed with two types of deployment, deployment on single Azure VM and deployment on two Azure VMs. I will only elaborate on the first, since both deployments have similar steps.
Example-1VM.ps1
using the PowerShell command present in WindowsPowerShellScriptsCloudHowTo
Example-2VM.ps1
is used to deploy the system on two VMs, whereas Example-1VM.ps1
is for a single VM
Note that the cmdlets are to be run on a virtual machine, so copy the saved file onto your VM first.
The steps in this example file are explained as follows:
.bak
file that should be used when creating instancesSince all the cmdlets are already present in the file, CM on two machines also can be done similarly. The best part of the example file is that it is well documented and clear to read.
Microsoft Dynamics NAV on Azure VM is more like an on-premise installation. Here we can create a SQL Server for hosting the NAV Database.
Following is a list of prerequisites for this deployment process:
To deploy a Microsoft Dynamics NAV database to an Azure SQL Database, the database must be exported as a data-tier application (DAC) file, which is known as a .bacpac
file. This can be done using SQL Server Manager.
Creating a new database in the Microsoft Azure online portal includes some easy steps, which are explained as follows:
We can manage Windows Azure at the following link: https://manage.windowsazure.com/.
Let's test the connection from our local Microsoft SQL Management Studio. Before we start the connection, let's note down the information that will be needed for the connection. Go to the DASHBOARD tab of the server (similar to the CONFIGURE tab in the last step), and note down the administrator login information; this is the user name. From the dashboard of the database, note down the server name. In this case, the server name is j498jdtrqf.database.windows.net. Now let's use this information for the connection of the database engine. Use the password that we used while creating the database:
After successful connection, you can see the Azure SQL database on your SQL Management Studio Object Explorer. Now we can treat this database as any local database. But if we want to add any database to this server, then we will have to follow the steps which will satisfy certain criteria set by Azure Server.
Now, let's see how to replicate a database to the Azure SQL database:
This will deploy a local database to SQL Azure and a connection is established between the local DB and the SQL Azure Database Server:
Now you just need to click the Next button, and you will be presented with the Deployment Settings page, which is an important one, because here you will have to connect to the Azure SQL database with your credentials, as shown in the following screenshot:
It takes a while depending on the size of the database.
After the process is sucessfully completed, we can see the same database in the SQL Azure database, as can be seen in the next screenshot.
Here, we have successfully connected an Azure SQL database using our SQL Server Management Studio, which is a local entity. You can see a database named Demo Database NAV (9-0) inside the database server, j498jdtrqqf.database.windows.net(SQL Server 13.0.81 - rabins):
In case of an error, try to find the error, resolve it, and repeat the same process.
We will now create a virtual machine which will be used to host the Microsoft Dynamics NAV system. Follow the following steps:
Generate the credentials for the login, and note down the password and user name, as this will be needed while connecting to this VM:
Just follow the steps and finish the process of creation of virtual machine with Microsoft Dynamics NAV installed in it.
It is very fast and reliable.
And that's it. We have a brand new virtual machine up and running. Explore the properties and Firewall settings to ensure everything is perfect:
The NAV System should run its local database quite easily, since it is internally configured by the Azure Server while creating a virtual machine.
Now we can configure the instance setting in the Microsoft Dynamics NAV Administration tool, as shown in this screenshot:
We can easily connect to the Role Tailored Client after the services are restarted.
Here we will discuss the Installation process of Microsoft Dynamics NAV 2016 on a multitenant environment.
Following is the list of prerequisites for this installation process:
The entire process can be understood in just a few steps, which are as follows:
We are first going to separate the application data from the business data.
The following are the steps for separating the application data:
Export-NAVApplication
Remove-NAVApplication
#cmdlet for removing Application Remove-NAVApplication -DatabaseServer <Server name> -DatabaseInstance <Instance name> -DatabaseName <name of the original DATABASE> #cmdlet for mounting Tenants Mount-NAVTenant -DatabaseName <NAVDatabase> -Id <TenantID> -ServerInstance <NAVServerInstance> -OverwriteTenantIdInDatabase ----------
It is quite easy to get going with the PowerShell commands by just working around the codes.
For example, we can just write these commands and compile them as follows:
Set-ExecutionPolicy RemoteSigned -Force Import-Module 'C:BackUpProgramFilesNAV.9.0.44974.NA.DVDWindowsPowerShellScriptsMultitenancyHowTo-MoveCompanyToTenant.ps1'
This will give you access to all the functions of the PowerShell file:
It is again the PowerShell cmdlet that makes like easier; just locate the folder WindowsPowerShellScripts/Multitenancy
in your installation DVD, and you are just one step away from all the possible stuff you need in the multitenancy world.
Just import the file in Windows PowerShell ISE (run as administrator), and execute it to get the result as follows:
Some tips if you want to try your own customized code. Activate Intellisense, and import the PowerShell file you want to work with. Run the line, and you are good to go. You can now use all the functionalities of that file. It is the same like C# coding.
Change the font size
Change margin width
Change background colour