Get started with application language

Completed

If you want to write programming code for Business Central to manipulate data, connect to external webservices, or perform complex calculations, you need to use application language (AL). Application language is the programming language for Business Central, and it's written in Visual Studio Code.

Application language allows you to control the implementation of objects and to interact with the user. Additionally, application language contains a set of predefined functions that you can use when writing code, but you can also develop your own custom functions.

In AL, you can have Event triggers or Procedure triggers. Every object type in AL (Table, Page, CodeUnit, Report, and so on) has event triggers, and their names start with On, for example OnInsert, OnModify, or OnDelete. These triggers are fired when an event takes place. The available triggers depend on the type of object.

You can also write your own custom procedures in an object, and these custom procedures will be accessible in the object by Procedure triggers. These custom functions are called Procedures.

Like in other programming languages, AL enables you to create variables that you can use in procedures and triggers to calculate or store temporary data.