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
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
Hi Dhyani,
ReplyDeleteI 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?
Suresh,
DeleteYou 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.
How to place the Menusuite from VS Code
ReplyDeleteMenusuite is obsolete with Business Central. Usage category is new property that you can assign in Pages and report to place items in right menu.
DeleteDear 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@Suresh,
DeleteFor 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
Your content is very usefull Saurav..!
ReplyDeleteThanks @Manohar Jdhav.
Delete