How to Connect your Visual Studio Code with Business Central

How to Connect your Visual Studio Code with Business Central

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 Microsoft Dynamics 365 Business Central.

There are two versions of business central available

  • Business Central On-Prem
  • 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 From the below Link:

https://code.visualstudio.com/download

Now open visual studio code and go to extensions

open visual studio code and go to extensions

And now search for AL Language and select the below.

 search for AL Language

Now click on install:

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

press Ctrl+Shift+P run command AL data-srcset=Go” width=”602″ height=”145″>

After that it will ask you the 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):

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

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:

Microsoft Cloud sandbox

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:

select the second option

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

Business Central administrative tool

After this restart your service.

And run the command AL>Download Symbols

AL data-srcset=Download Symbols” width=”618″ height=”338″>

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

start your development in AL

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 must check you service port and both options are enabled 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.

Disclaimer– “All data and information provided on this blog is for informational purposes only. Dynamics Square / MPG Business Information Systems Pvt. Ltd. makes no representations as to accuracy, completeness, currentness, suitability, or validity of any information on this site and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its display or use.”