Skip to main content

MSDYN365BC - Connect Microsoft Dynamics 365 BC On-Prem To Visual Code Editor?

Hi Readers,


If you are reading then you know that we have already installed Microsoft Dynamics 365 BC (on-Prem) and also checked where components are installed and all available client options.

In this article, we will discuss how to connect your local MSDYN365BC (on-Prem) environment to the VS Code that we will use to customize nav using Future Programming Language (AL).

This article is based on the request from Angelo Castro, so all thanks to him.

1. Open VS Code.



2. Use Keyboard Shortcut Ctrl+G to open Command Palette (as shown below) as type - >AL:Go! or used shortcut Alt+A and Alt+L.



3. By Default System will try to add a folder in Your Document Folder for an extension. You can change the folder name or the path if you want (as shown below).



4. The system will create a folder in the specified path. Then please select the Server, this will be the next option in the same window. (Select your own Server)


5. If you are using Navuserpassword authentication then enter Username and Password, otherwise hit enter as shown below. The system will create the launch.json as shown below. We will update the configuration file to map to the local database.


6. Update authentication Parameter to Windows (if you are using windows authentication).
    Update Parameter ServerInstance with the service name as shown below.


7. By default system maps the Port to 7049, but if you are using a custom port then you need to update that port number manually in the configuration file as shown below.


8. To verify that VS Code is ready to code against the Service Tier (it is mapped to), default HelloWorld.al should get compile as shown below. As of now if you can see, HelloWorld.al is not compiled and have some problems reported in the screen below.


9. To get it Problem resolved, we need to download symbol from the database mapped to service.
Let's use shortcut again Ctrl + G and select > AL:Download Symbols as shown below. This action will download references to all NAV Objects in the database mapped to service and we will see a confirmation in the bottom part of the screen as shown below.


10. Once symbols are downloaded, the Hello World. al file should get compiled without any problems reported. (as shown below)



All good. We can delete the HelloWorld.al and start preparing our extension for Business Central on- Prem.

Hope you find the information useful. Let me know if any questions.

Stay tuned for more.

Regards,
Saurav Dhyani

Comments

  1. Hi Dhyani,
    I have a question. Unfortunately , I Published the base Hello world extension of Customer List page. It worked fine and unable to unpublish it back. And What is the way of addons to merge to BC . I have a addon which they given us the AL objects. How to get import to BC database from VS Code ? I did not see any kind of option to import .
    It will be great if u provide some solution or ur blog on this topic?

    ReplyDelete
    Replies
    1. Suresh,
      You can uninstall an app which is installed from Extension Page in Web / Windows client. If required i can detail out steps in future article.
      Related to Addons -
      For Addons if they give you AL Objects you need to publish it from VS Code. If they give you .app file then you can use powershell.

      Delete
  2. How to place the Menusuite from VS Code

    ReplyDelete
    Replies
    1. Menusuite is obsolete with Business Central. Usage category is new property that you can assign in Pages and report to place items in right menu.

      Delete
  3. Dear Saurav, I am trying to download the Symbols from Visual Code and it is giving me error on saying No published package matches the provided arguments. Can u help me on this issue please . This is when I try with NAV 2018.

    ReplyDelete
    Replies
    1. @Suresh,
      For NAV 208 try to follow steps to get VSIX from NAV Installed Version instead of Downloading extension from VS Store and then try download symbol.
      https://saurav-nav.blogspot.com/2019/01/msdyn365bc-error-this-al-extension.html

      Delete
  4. Your content is very usefull Saurav..!

    ReplyDelete

Post a Comment

Popular posts from this blog

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

MSDYN365BC - Data Upgrade To Microsoft Dynamics 365 Business Central on premises.

Hi Readers, We have already talked about the number of steps for upgrading to Business Central on Premises from different NAV versions. After that article, I received multiple requests for an article which list down steps for Data Migration. In this article, we will discuss steps of data migration to MSDYN365BC (on-Prem) from NAV 2017. For this article, I am considering a Cronus Demo Database without any customization. For an actual upgrade project, we will have to complete object merge using compare and Merge process. After the Merge Process, the next step is data migration. Let's discuss those steps. Direct Upgrade to Microsoft Dynamics 365 Business Central (on-Prem) is from following versions - 1. NAV 2015. 2. NAV 2016. 3. NAV 2017. 4. NAV 2018.