Syntax

Note

We're working on improving the onboarding experience for AL developers. If you've input for this article, we'd love to hear from you. Please use the Feedback section at the bottom of this article to help us make improvements that you’d like to see.

We also welcome contributions to our docs. New to contributing to docs? Don't worry, read more about contributing here Contribute to the help.

The syntax of the AL language is designed to assist in building business applications for Business Central.

Tip

Use Ctrl+Space to trigger IntelliSense and get assistance on code completion, parameter info, quick info, and member lists.

In addition to the inline help of IntelliSense, you have access to various snippets that'll give you a template for a specific object type. Use a code snippet from an .al file by start typing the snippet name. All snippets start with the letter t. For example, to get a template for a table, type ttable and press Tab.

Examples of snippets

The following is a non-comprehensive list of the snippets that you can use in the AL.

Type... To get a...
taction Action structure
tassert Assert error structure
tcaseof Case of structure
tcaseelse Case else structure
tcodeunit Codeunit object structure
tcontroladdin Control add-in structure
tenum Enum structure
tenumext Enum extension structure
tfield Table field structure
tfieldpage Page field structure
tfor For structure
tif If structure
tifelse If else structure
tpage Page object structure. Choose between Card, List, API, or RoleCenter type.
tpageext Page extension structure
tprocedure Method structure
tquery Query object structure
trepeat Repeat until structure
treport Report object structure
ttable Table object structure
ttableext Table extension structure
ttrigger Trigger structure
twithdo With do structure
twhile While structure
txmlport XMLport object structure

See also

Get started with AL
Developing extensions in AL