Friday, December 21, 2018

Create your first application in Business Central 365 through AL Visual Studio Code.


Hello All,

Greetings!!
Hope you all are well.

Here we will create our first application in Business central using visual studio code in AL language.
For going forward we have minimum prerequisite for both cloud and on premises.

1. Window 10 Pro, Enterprise or Education edition
2. Business Central 365 on premises or Cloud
3. Visual studio code installed on machine

For more detail you can click below URL..
 https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/deployment/system-requirement-business-central

Here you see the Visual studio screen how it look like after installation




Now we need to install AL for this we need to click on Extension and the search for AL language.

After installing AL extension go to bottom at left side and click on setting icon then you will see command palette click it.


And now search for the "open work space" to add a project folder.
In an AL project there are two JSON files; the app.json file and the launch.json file. These files are generated automatically when you start a new project. The app.json file contains information about extension that you are building, such as publisher information and specifies the minimum version of base application objects that the extension is built on.


The launch.json file contains information about the server that the extension launches on.



After this will create standard extension for adding message on open of customer list as well on close page.

To create this we use code snippet which gives us a basic structure of object such as table, pages, codeunit etc. and their properties as well.
for this we have shortcut which are as below
Ctrl + space
t + space or t 
this will show you snippet to create your project.




As you can see after adding code we have published through VS itself to the BC server. we can also publish it by powershell will cover this on later.
For publish extension we use F5 with debugging and Ctrl + F5 with out debugging.
Let's check on the Business central RTC.. 




In next topic will cover how to add a new field on existing standard table.

Thanks.

No comments:

Post a Comment

How to Call an external API from NAV C/AL code

Hello All, Greetings! Hope you all are well. This post will cover how to consume external SOAP API and for this, we would u...