topic hubAL Developmentofficial - Microsoftreviewed - checked by Opus

Programming in the AL language

Programming in the AL language for Business Central: language fundamentals plus subtopics on syntax, tables and data, pages, reports, events, error handling, security, background tasks, APIs, telemetry, external calls and .NET. It answers how-to, syntax and design questions for AL extension development.

Path: Development > Programming in the AL language · tier official · system development · narrative reviewed (checked by Opus)

Overview

This section is the entry point for writing AL code. The top page, Programming in AL, describes the language fundamentals: manipulating data, controlling application objects, creating business rules and writing code in triggers across tables, pages, reports and other objects. It also touches on variable declarations, protected variables, trigger types, code reuse and security patterns.

The subtopics split the work by area. Program building blocks, Language elements and Formatting values cover syntax and data conversion. Tables and data, Pages and the user interface, and Developing reports cover the main object types. Events, Error handling, Handling security, Running things in the background, Developing APIs, Instrumenting with telemetry, Calling external services, device capabilities, printer extensions and on-premises .NET cover the cross-cutting and integration topics.

Start with Programming in AL and Program building blocks to learn the basics. Then move to the object-type subtopic you need, such as tables, pages or reports. Use Events to extend behavior without changing the original code. Use Error handling and Handling security when you design robust and safe extensions.

Key points

  • Programming in AL covers variable declarations, protected variables, trigger types, code reuse and security patterns.
  • Program building blocks covers statements, operators, system-defined variables, access modifiers and XML comments.
  • Error handling covers try methods, collectible errors, actionable errors with Fix-it and Show-it actions, and error telemetry.
  • Tables and data covers queries, FlowFields, SIFT and NCCI indexing, XMLports, Excel import/export, number sequences and the DataTransfer type.
  • Developing reports covers Word, Excel and RDLC/RDL layouts, request pages, extensions, substitution and obsoleting.
  • Events covers publishing, raising and subscribing, isolated events and the Event Recorder.
  • Handling security covers permission sets, entitlements, Azure Key Vault, Isolated Storage and the SecretText data type.
  • Background processing covers page background tasks, Session.StartSession, the task scheduler and the job queue.

Subtopics

More Learn pages

  • Programming in AL: AL is the programming language used for manipulating data such as retrieving, inserting, and modifying records in a Business Central database. It controls the execution of the various application objects, such as pages, reports, or codeunits.

Videos, posts and code changes

Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.

Business Central pages and reports

The pages, reports and queries this hub’s Learn pages name (ms.search.form, API reference), joined to the code by exact object id (data/index/docs-objects.json); a page shows the table it runs on.

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 8 of 340 Learn pages

Show 32 more