Wednesday 13 February 2019

Dynamics 365 Business Central : 15 steps AL Developers needs to follow

Let's discuss here about the steps involved for setting up environment to write extensions for Dynamics 365 Business Central that gives a path to become an AL Developer.

Firstly, Business Central and VS Code must be installed in your local machine.

Step 1:
Download the latest visual studio code using this link VS Code download
Install the Visual Studio Code. (Run as administrator)


Step 2: Install Extensions

Open Visual Studio Code and bring up the extensions view by clicking on the extensions icon or tape the Extensions command (Ctrl+Shitf+X)


Step 3:
Install AL Language Extension
Install AL Language Extensions from Marketplace
Search for AL language Extensions and click Install button.


After a successful install, you will see a Reload button. Clicking on the button will restart VS Code to enable the extension.

Step 4:
Install AL Language Extensions from Dynamics 365 Business Central Setup Folder
Click on the <Three point button action> and click on “Install From VSIX…”


Step 5:
Navigate to the file ALLanguage.vsix, and click Install

Path of the file: Dynamics365BusinessCentral\ModernDev\program files\Microsoft Dynamics NAV\130\AL Development Environment


Step 6:
Configure Dynamics 365 Business Central Instance
Open Business Central Administration and ensure that “Enable Developer Service EndPoint” and “Enable loading application symbol references at server startup” are active then restart Service.

Step 7:
Create your first application
Open Visual Studio Code and then press: Ctrl+p and choose AL:Go!


You can also press: Alt+a then Alt+L


Step 8:
Choose the project directory, then choose the sandbox Create a sandbox development environment
In our case, we will select (Your own server)

Step 9:
Then we have to setup the configuration of our application to connect with the server.

Step 10:

Configure application
In an AL project there are two json files. When we start a new project, these files are generated automatically. Know more about these JSON Files

Let’s discuss some important and mandatory properties:

Step 11:
On launch.json file, modify the properties of "serverInstance" and "Authentication"

ServerInstance : Your server instance name (DynamicsNAV130 for our case)
Authentication : Your server authentication method (Windows for our case)

Step 12:
Once launch.json and app.json are modified, press Ctrl+p and choose “AL:Download symbols”


After download complete, you should see two new files added to your project.


Step 13:
Now, just press Ctrl+F5 to publish your extensions without debugging.
A new file “.app” will be generated under the project directory.

Step 14:
Development


Few important notes:
Note 1: All functionality in Dynamics Business Central is coded in objects.
Table objects define the table schema that hold data, page objects represent the pages seen in the user interface and Codeunits contain code for logical calculations and are saved in files with .al file extension.
Note 2: There are two other special objects which are specially used for building extensions:
The table extension object : Allow us to add additional fields or to change some properties on a table provided by D365BC.
Note 3: The page extension object : Extends a D365BC page object and adds or overrides the functionality.
Note 4: A single .al file can contain multiple objects.

Step 15:
Test Extension
First, check that the extension is installed

Now open the Customer list page and you should get this message

I would like to thank MSDN official content and also mibuso users in bringing out this topic in open forum.

No comments:

Post a Comment