This walkthrough, covers the steps of setting up the environment to write extensions for Dynamics 365 Business Central
Dynamics 365 Business Central and Visual Studio Code must be install in your local machine.
- Open Visual Studio Code and bring up the extensions view by clicking on the extensions icon or tape the Extensions command (Ctrl+Shitf+X)
- 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 this will restart VS Code to enable the extension.
- Install AL Language Extensions from Dynamics 365 Business Central Setup Folder
Click on the <Three point button action> and click on “Install From VSIX…”
Navigate to the file ALLanguage.vsix, and click Install
Path of the file: Dynamics365BusinessCentral\ModernDev\program files\Microsoft Dynamics NAV\130\AL Development Environment
- 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.
- 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
Choose the project directory, then choose the sandbox Read more
In our case, we will select (Your own server)
Then we have to setup the configuration of our application to connect with the server.
- Configure application
In an AL project there are two json files. When we start a new project, these files are generated automatically.Read More
Let’s discuss some important and mandatory properties:
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)
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.
Now, just press Ctrl+F5 to publish your extensions without debugging.
A new file “.app” will be generated under the project directory
- Development
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.
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.
- The page extension object : Extends a D365BC page object and adds or overrides the functionality.
A single .al file can contain multiple objects.
- Test Extension
First, check that the extension is installed
Now open the Customer list page and you should get this message
Answers
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Great Job !!
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/