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

AL Development 03 - How to Develop New Report in AL?

Hi Readers, Now its time to develop the most important part of Navision which client desire the most yes you are correct i am talking about Reports. As we know to develop any solution in Business Central we must start working on AL Code Extension so from this blog you will get to know the detailed step how to create a Report through AL Code in business Central. Note: As of now there is no provision to customise the base report. Let’s try to create a simple report. Add new file with .al extension in your project folder through visual studio code My File Name is My_report.al  Code Snippet for adding a new Report, use snippet treport as shown below: Next Step to set these Report Properties - • Assign ID and Provide a name of the Report that you are adding. • Set UsageCategory to ReportsAndAnalysis. • Set ApplicationArea to All. As you select the treport snippet then a default structure of the report is created as below: Basically, there are 3...

Custom sheet name in RDLC Reports

Hi Readers, In this article we are going to discuss how to change the excel sheet name while using base Navision SAVEASEXCEL functionality. Applicable for RDLC reports of Navision and SSRS reports. Let’s say we have the following report that shows total sales by product category by territory:   When we export this report to Excel, we’d like each territory to appear in its own worksheet and each worksheet named after its territory: How do we make this work? Easy! 1) Put every group on its own page. 2) name each page using the same field the group uses. Step 1: Put each group on its own page To put each group on its own page, open the group’s property window. Then, in the Page Breaks category, put a check mark in the Between each instance of a group check box. Click OK to complete this step. Step 2: Name the pages of the group With the group selected in the Row Group s panel, press F4 to open the Properties window. Next, expand the Group ...

AL Development 01 - How to Develop New Table in Database?

Hello readers, As we know to develop any solution in Business Central we must start working on AL Code Extension so from this blog you will get to know the detailed step how to create a table through AL Code in business Central. Requirement : Need to create a new table with below fields: Now let’s Start: Try to keep a naming standard for your projects; As I am using the combination of Table description +Table-ID, you can use your own naming convention. So, my table file name is: My_Table50129.al AL provides a list of the snippets to make it easy for developers to add objects in extension. Snippet for getting a table layout use snippet ttable (here we have to t as prefix for every type of object we want to create in AL) as shown below: Now Assign the ID and name of the table as below: As you select the ttable from the list a default table design structure is created as shown below: You can divide the whole table into 4 Sections - · F...