Skip to main content

How to connect your Visual Studio Code with Business Central

Hello Readers,

In this article I am going to show how to connect your business central with visual studio code so that you will be able to start your development for business central.
There are two versions of business central available
  1. Business Central On-Prem
  2. Business Central Online


For both above we need to do some common setup in visual studio code which are as below:
Download and Install Visual Studio Code fromhere.


Now open visual studio code and go to extensions:


And now search for AL Language and select the below:



Now click on install:



After Installation restart the visual studio code.
Now go to command pellet or press Ctrl+Shift+P  run command AL>Go



After that it will ask you path where you want to save your project by default it will show you a path you can change it if you want (ALProject4 is project name):



After that it will ask you whether you want to connect it through Business Central Online or Business Central On-Prem



If you select Microsoft Cloud sandbox, then you will be asked for your Business Central Online Account user-id and Password Log in using credentials:








If you select the second option i.e.  “your own server” this option is used for Business Central On-Prem then you have to change some parameter values launch.json file as below:




You can also find the development port from Business Central administrative tool also you must enable the below two settings in the server instance.



After this restart your service.
  
And run the command AL>Download Symbols



If command executes successfully then you will see the below message in the output window of the visual studio code:



Now you are good to go, and you can start your development in AL.

Note: If you are getting some error in downloading symbols then you have to check you service port and both options are enable and you have chosen the right port in Launch.json file, as without downloading the symbols you will not be able to access base objects of business central.

Comments

Post a Comment

Popular posts from this blog

Improved performance features of Business Central 17

  In the training I’ve done to some partners last week, when talking about performances I shared an example of an extension with 3 features that I think are not so well known but that have a significant impact on how your code performs, expecially on a SaaS environment. That extension used the following features: Partial record loading Temporary Tables QueryCategory The  Partial record  capability  is a new feature available starting from Dynamics 365 Business Central 2020 Wave 2 (v17) and I think it’s one of my top personal desiderata from years. This feature permits you to load only the needed fields of a recordset (when accessing a data source) instead of loading the entire set of fields. This is particularly useful on reports and OData pages because you can avoid to do a SELECT * (plus JOINS with all the extension’s tables) and instead doing a SELECT of only the fields you need. Now you can do something like: procedure TestPartialRecord(): Decimal ...

UPGRADE CUSTOMIZATIONS TO V2 EXTENSION (Application and Data)

From Navision 2018 Onwards, Navision only support v2 Extension. Dynamic Navision Extension will make upgrade easier. If customizations are converted into V2 extension that means v2 Extension consist upgraded Data as well as customizations, also it will be easy to upgrade into new version of Navision and apply CU updates. Below are the detailed steps to upgrade customizations into Navision 2018 v2 Extensions .  1) you have Customized database in Microsoft Dynamics Navision 2018. 2) Create the new table for each table that is customized or also for customized field in standard table but while creating table for standard table, add the primary key and customized field with same ID and Name in new table. For E.g.: I have created 1 table “Person” and 2 Customized Field (Test, Doc No) in “Sales Header”. Now create 2 New tables in 2018.  · Upg Sales Header -> Two base field (PK) and customized field -> Same ID and add primary key. Refer be...

๐Ÿงพ Understanding Interfaces in Business Central (With Real-Life Example)

๐Ÿ’ก A Simple Guide for Beginners If you're learning Microsoft Dynamics 365 Business Central , one concept that often feels confusing at first is Interfaces . But don’t worry — let’s break it down in simple, real-world language so you can understand not just what interfaces are, but why they matter . ๐Ÿง  The Problem We Face in Real Projects Imagine you’re building a payment system in Business Central. Your company accepts: ๐Ÿ’ณ Credit Card ๐Ÿ“ฑ UPI ๐Ÿฆ Bank Transfer At first, a simple approach looks like this: if PaymentType = 'Card' then     ProcessCard() else if PaymentType = 'UPI' then     ProcessUPI() else if PaymentType = 'Bank' then     ProcessBank(); ✅ Works fine… for now. ๐Ÿšจ But Here’s What Happens Later As your system grows: New payment types get added (PayPal, Wallet, etc.) Code becomes longer and harder to read Every change requires modifying existing logic Risk of breaking existing functionality increases ๐Ÿ‘‰ This is where interfaces come to...