Search This Blog

STEP 3 - MSDYN365BC (Setup) - How to Setup Business Central

In the last articles in Step 1 & Step 2 of MSDYN365BC setup we installed dockers & Visual Studio Code for windows.
Next step is to download the Business Central Image using dockers and in future articles, we will start hacking or customizing Business Central.

If you are new to this series you can read old articles referring label MSDYN365BC.

Setup Business Central

Search and open Windows Powershell ISE as administrator.
Run command docker version to confirm that docker is installed and running.
If it's installed and running you will see an output as in below screenshot. If not then run the docker from the desktop shortcut or from the start menu.
Run command docker pull microsoft/bcsandbox:us to download the image for Business Central US version.
** This command running for the first time will take some time to download, don’t run it on a weak internet connection.
Using an object-oriented programming analogy, the difference between a Docker image and a Docker container is the same as that of the difference between a class and an object. An object is the runtime instance of a class. Similarly, a container is the runtime instance of an image.

Run PowerShell command –
Set-ExecutionPolicy RemoteSigned
We will be running the script and by default, PowerShell stops running scripts. Run above command to set Execution Policy to Remote Signed.
install-module navcontainerhelper -force
navcontainerhelper is a PowerShell Module, which can be installed from the PowerShell Gallery by using above cmdlet.
docker images
Above command will list down all the images that you have downloaded till now. If you have already run download image in the last section you should see one image as shown below.

docker container ls
Above command will list down all the containers which are running right now. As we don’t have any containers it will return blank.
New-NavContainer
For above command, please run using right-hand command panel and specify following parameters as per requirement.
A Sample command for New-NAVContainer is below –
           
New-NavContainer -containerName sauravMSDYNBC -accept_eula -alwaysPull -assignPremiumPlan -auth NavUserPassword -doNotExportObjectsToText -enableSymbolLoading -imageName microsoft/bcsandbox:us -includeCSide -memoryLimit 3G -shortcutsDesktop -updateHosts

Once you run above command, the system will prompt you to save your username & Password as encrypted.
** Remember your password.
** Password should fulfill password policy for SQL Server.

Once­ the PowerShell command is complete, a screen like below as result of PowerShell cmdlet.
Please keep a note of from above screen –
** These values will be used for using this container.
1      Container IP Address
2        Container Hostname
3        Container Dns Name
4        Web Client
5        Dev. Server
6        Dev. ServerInstance
7        Files

Check your desktop, you should have all shortcut icons that are require accessing Business Central Container.
Go ahead and use any of these + if you have SQL Server management studio installed, you can connect to SQL for Docker database.

** Remember as docker will start all containers will start automatically. Please remember to use docker container stop cmdlet to save the memory of your host machine.

If you are interested to load some old NAV version using docker you can refer following GitHub page.

Business Central (Github) : https://hub.docker.com/r/microsoft/bcsandbox/
Dynamics NAV    (Github) : https://hub.docker.com/r/microsoft/dynamics-nav/

Be Ready, with the setup of business central on your local system. we will be discussing AL Code and how we can customize Business Central.


Source : https://saurav-nav.blogspot.com/2018/06/msdyn365bc-setup-business-central.html

STEP 2 - MSDYN365BC (Setup) - How to Install Visual Studio Code

In the last article Step 1 of MSDYN365BC setup, we installed dockers for windows. Most of us know that for coding in Business Central on cloud version we will require to use Visual Studio Code.

We all know that is future, I will leave it to you if you plan to ignore it but that is a clear Roadmap for the product in future. Even Business Central on-prem will allow customizing using NAV Developer environment I think its time we change our mindset and start using Visual studio Code.

In this article, we will discuss installation of Visual Studio code that we will use in future articles to customize business central.


What is Visual Studio Code?

Visual Studio Code is a source code editor developed by Microsoft for Windows, Linux, and macOS. It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring.


Is Visual Studio Code is a replacement of C/AL?

No, it's not the way we code in NAV from ages will remain as it is in VS code. I would even say that coding in VS Code will make life more simple with new features that are available.

Yes, it will change the way we used to code. It will not allow us to modify any base objects in any way. You can only see the Metadata of standard object but you cannot modify it.


How it will impact?

It will be hard as everyone of us will have to unlearn old way of customizing NAV and will need to learn the new way of doing things which is using events and subscriptions?

Event and subscriptions are available from NAV 2016 and have enhanced in last 3 version.


We heard a lot about extensions. Do we need to worry about it?

If you have used extension V1 which is in NAV 2016 you might have the bad experience with them. Forget all those experiences and see the new V2 Extension which is completely automated.

If you haven't used extensions (as developers) you don't need to worry about it. Its all automated.  If you want to focus/learn then spent your time and energy on Events and subscriptions.

Installation of Visual Studio Code- 

Visit - https://code.visualstudio.com/Download

Download the installer from the website, based on your operating system.

Double-click VSCodeSetup Installer to run the installer.

I would suggest - During Installation setup actions for windows (all) as shown below.


Ready to Hack Business Central on Dockers. Just one more configuration that we will discuss in next article and then we will talk business.


STEP 1 - MSDYN365BC (Setup) - How to Install Dockers

The first article in this series is about the installation of dockers for windows. I know there may be some questions about dockers and why a new technology or software with all these changes in Product.

I will try to answer most of these questions and we will also talk about installation of Dockers.


What is Dockers?

Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications, whether on laptops, data center VMs, or the cloud.

Read More about dockers here -  Link - https://www.docker.com/what-docker

Is Docker is a Microsoft Product?

Docker is not a Microsoft product. It's an open source software. In October 2014, Microsoft announced the integration of the Docker engine into the next Windows Server release. Windows Containers was made available for Windows 10 and Windows Server 2016.

Why we need to install Docker?

Freedy from Microsoft has put great efforts in integrating NAV and MSDYN365BC with Dockers.

With respect to NAV, dockers can be used for the following version -
1. NAV 2016.
2. NAV 2017.
3. NAV 2018.

All cumulative updates released by Microsoft on following versions are also available on dockers.

Business Central (latest and greatest) releases is also available in dockers.

More Resources by Freedy - https://blogs.msdn.microsoft.com/freddyk/tag/nav-on-docker/

You can plan to use or not to use dockers but I personally feel it will be a cool tool in your toolbox to have multiple version and CU in one single environment which can be accessed turn on and off based on your requirements. I will be using dockers to configure and demo Business central.

Docker Installation - 

Navigate to https://store.docker.com/editions/community/docker-ce-desktop-windows

Download the installer from the website.


Double-click Docker for Windows Installer to run the installer.

In the configuration panel, please select “Use Windows containers instead of Linux containers.”


Installation completed confirmation message.



When the installation finishes, run docker from the desktop (if you selected Add shortcut to desktop).

The whale icon in the notification area indicates that Docker is running, and accessible from a terminal.

Be Ready with Dockers, we will be using in future articles. We have one more installation to be done to continue our journey towards Microsoft Dynamics 365 Business central. We will talk about it in future articles.


Source : https://saurav-nav.blogspot.com/2018/06/msdyn365bc-install-dockers.html