topic hubAL Developmentofficial - Microsoftunreviewed - model text not yet checked

Objects

AL object types in Business Central: tables, pages, codeunits, reports, queries, XMLports, extension objects, permission sets, profiles, entitlements, control add-ins, and test codeunits. It answers questions about what each object is for, its key properties and triggers, and how to extend it.

Path: Development > Programming in the AL language > Language elements > Objects · tier official · system development · narrative unreviewed (model text not yet checked)

Overview

This section is the reference for the object types you write in AL. It covers data objects (table, table extension, table keys), UI objects (page, page extension, page customization, control add-in, profile, profile extension), logic and output objects (codeunit, query, report, XMLport), and security and licensing objects (permission set, permission set extension, entitlement).

Extension-oriented pages show how to change existing objects without editing them. Table extensions add fields, keys and trigger code. Page extensions add or move controls and actions. Page customizations are a more limited option tied to specific profiles. Permission set extensions add permissions to existing sets. Profile extensions change existing profiles.

Testing has two pages: one on test codeunits and test methods, and one on test runner codeunits. The AL Properties Overview explains how properties work across all objects. Start there for general concepts, then go to the page for the object type you need.

Key points

  • Codeunits hold reusable business logic as procedures, with an OnRun trigger.
  • Table objects define fields, keys, triggers and metadata. Table keys cover primary, secondary, unique, clustered and IncludedFields keys.
  • Page extensions use addfirst, addlast, addafter, addbefore, modify and the move keywords. Page customizations are more limited: no variables, procedures or triggers, and they apply only to specified profiles (runtime 16).
  • Reports support RDL, Word and Excel layouts and request pages. XMLports import and export XML data. Queries join tables through dataitems and columns.
  • Permission sets can be composed with IncludedPermissionSets and ExcludedPermissionSets. Permission set extensions add permissions automatically on install and remove them on uninstall.
  • Entitlements define which objects customers can use based on licenses or Microsoft Entra roles, and support Marketplace app transactability.
  • Profile objects set a role center and optional page customizations.
  • Test codeunits use test methods, handler methods and attributes such as TransactionModel and TestDataSource. Test runner codeunits use the TestRunner subtype with OnBeforeTestRun and OnAfterTestRun triggers.

Learn pages

  • AL Properties Overview for Business Central: Explore AL properties for tables, pages, reports, queries, and other objects in Dynamics 365 Business Central development.
  • Codeunit object: Describes the codeunit object, which is a container for business logic in AL for Business Central.
  • Control add-in object: Description of the control add-in object type in AL for Business Central.
  • Create Test Runner Codeunits in AL: Learn how to create test runner codeunits in AL to manage the execution of test codeunits and integrate with test management or test reporting frameworks.
  • Entitlement object: Discover how to define and use entitlement objects in AL for Business Central.
  • Page customization object: The page customization object in Business Central allows you to add changes to the layout and actions on page that are accessible for a profile.
  • Page extension object: Extend page objects with page extension objects in AL for Business Central.
  • Page object: Description of the page object and its syntax in AL for Business Central.
  • Permission Set Extension Object: Use AL permission set extension objects in Business Central to add permissions to existing sets and design targeted changes that avoid excess access.
  • Permission set object: Describes the permission set object, which sets permissions on objects in AL for Business Central.
  • Profile extension object: Description of the profile extension object, which allows you to modify an individual experience for each user profile.
  • Profile object: Description of the profile object, which allows you to build an individual experience for each user profile.
  • Query object: Description of the AL query object.
  • Report object: The report object in AL for Business Central allows to create a new report.
  • Table extension object: This article describes the table extension object in AL for Business Central.
  • Table keys: Learn about table keys in AL, including primary and secondary keys, and how to define keys in table objects and table extension objects.
  • Table object: This article describes the structure, object limits, and extensibility of the table object in AL for Business Central.
  • Test Codeunits and Test Methods in AL: Learn how to create test codeunits and test methods in AL, set the SubType property to Test, and use the different test method attributes in Business Central.
  • XMLport object: XMLport objects are used to export and import data between an external source and Business Central.

Videos, posts and code changes

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

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

What Learn documents here 8 of 19 Learn pages

Show 11 more