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

How to run a Table from the Navision windows client (Not the Development Environment)

Here is a small tip (some of you might already know it): the GETURL together with the HYPERLINK can be used to run objects in Navision (Even Tables 🙂).

I am working on a tool for a function to view the data in the tables, and for this I needed a way to run a table from the Navision windows client (Not the Development Environment). This turned out to be quite easy using the GETURL and HYPERLINK functions.

Here is an example of how it can be applied;

Given below record will consist of a list of tables where a user can check Records for the tables where all data is counted. To assist the user in determining what exactly is the data in a particular record we created a function to run the table to show the data will be in the ribbon of the page. The function will run the table of the line that is highlighted based on the Table ID field.

The code for this is as follows.
The GETURL is used to build the link to the table and the HYPERLINK is used to open the link.


Now when the user clicks View Records Dynamics NAV will open the table and show all records just like if the table was run from the Object Designer (Development Environment)

Nice isn’t it!? 🙂

Things to Know About Item Charges

The Item Charge functionality in Dynamics NAV gives you the option to include additional costs such as freight, insurance, fuel charges, etc. in the unit cost or unit price of an item transaction. Item Charges are something that most companies that handles any type of inventory would benefit from using. When implementing item charges there are a couple of things to be aware of :


Non-Inventoriable Costs
Item charges can be entered on a purchase invoice or purchase order and applied to an outbound transactions such as a sales shipment or a purchase return order. When doing this you get a non-inventoriable cost as a value entry. This does not create any g/l entries, the only place you see the affect of a non-inventoriable cost is in the statistics of an item and in the ‘Cost Amount (Non-Invtbl.)’ field on the item ledger entries.

Receiving / Shipping Item Charges
Item charges can be entered on a purchase or sales order. When receiving or shipping a line with an item charge you don’t get any transactions at all. There is no expected costs postings for item charges even if you turned this on the in inventory setup. This would have been very nice, but unfortunately it does not work like this. Something to wish for in future releases…

Item Charge Dimensions
Item charges creates value entries related to the item ledger entries of the shipment/receipt that is it applied to. Those value entries (and the related g/l entries) get dimensions according to the dimensions on the document line where the item charge is entered. This sometimes causes issues if you for example have an item charge that is applied towards multiple receipts that contains items with different default dimensions.

Users quite often setup the default dimensions on items with the ‘Value Posting’ equal to ‘Same Code’ because they want to prevent posting with other dimension values on the item. Doing this will also prevent posting the item charges with different dimension values that the one define as default on the items.

The recommended way to handle this is to setup the default dimensions on the items with the ‘Value Posting’ equal to ‘Code Mandatory’ and have a separate dimension values for the item charges, this way the item charges will always post and you can identify/separate them during reporting. Note: if you for example want to report the inventory value by the dimensions defined on the items then you can build your report based on the item ledger entries that contains the correct dimensions from the items and with the values including the item charges.

It would have been nice if the dimensions for the value entries created during posting an item charge would be retrieved from the related item ledger entry, but it does not work like this. Something to wish for in future releases…

Creating a Item with Inventory Value Zero in Navision

Dynamics Navision has an ‘Inventory Value Zero’ field in the item table that is not visible on the page (for some unknown reason).
Adding it to the page allows you to have items with no inventory values, this is useful if you managing inventory on the behalf of someone else or if you want to keep track of material that you have expended (like packaging materials, etc..).


An Item setup like this can be transacted like any other item in Dynamics NAV, except it can not be produced. If you try to enter a production order with an item flagged as ‘Inventory Value Zero’ you will get an error message saying ‘Inventory Value must be equal to ‘No’ in Item No. 'XXXX’ when you refresh the production order.

When purchasing an item  flagged as ‘Inventory Value Zero’ you will not get any inventory related transactions in the G/L, Only the Purchase transaction in the P&L and the AP transaction in the BS.

Microsoft Dynamics 365 Business Central

Microsoft Dynamics 365 Business Central is now official

Microsoft just released the new name for “Microsoft Dynamics 365 ‘Tenerife'”, where “Tenerife” was just a codename for the next version of “NAV-In-The-Cloud”. And as you might have figured from the title, that name is “Microsoft Dynamics 365 Business Central”

Generally available beginning April 2nd, Business Central offers businesses a single, end to end solution for managing finances, operations, sales and customer service, and an opportunity to easily upgrade from entry-level accounting software and legacy ERP systems.

Dynamics 365 Business Central will be generally available on April 2, 2018, in 14 countries – United States, Canada, United Kingdom, Denmark, Netherlands, Germany, Spain, Italy, France, Austria, Switzerland, Belgium, Sweden, and Finland, purchased through Cloud Solution Provider (CSP) partners.

Australia and New Zealand will be generally available beginning July 1, 2018.

Microsoft has given two interesting links for you to learn more about:

You can read more about this exciting news on clicking here.