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

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searching for the error i figured out the issue was due to - Design change in NA

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.