Objects
AL object types in Business Central: codeunits, tables and table extensions, keys, pages and page extensions or customizations, profiles, queries, reports, XMLports, enums, control add-ins, entitlements and permission sets. It answers questions about what each object does, its key properties and how to extend it.
Path: Development > The AL programming language > 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 has one page per object type, with no subtopics. The pages cover data (table, table extension, table keys, query, extensible enums), logic (codeunit), user interface (page, page extension, page customization, profile, control add-in), output and exchange (report, XMLport), and security and licensing (permission set, permission set extension, entitlement).
Many pages pair a base object with an extension object. Table with table extension, page with page extension and page customization, enum with enumextension, and permission set with permission set extension all follow this pattern. Extensions add to existing objects without changing the base definition. Page customization is more limited than page extension. It changes layout and actions only for specific profiles, and it cannot add variables, procedures or triggers.
Start with the Table object and Page object pages for the core data and UI model. Then read the matching extension pages. Use the Codeunit page for business logic, and the Permission set and Entitlement pages when you package an app for users or the Marketplace.
Key points
- Codeunits hold reusable procedures and business logic, and have an OnRun trigger.
- Table objects define fields, keys and triggers. Table extensions add fields, keys and trigger code without changing the base table. Table keys cover primary, secondary, unique, clustered and included-field keys.
- Page objects have page types, a SourceTable, layout sections, actions and views. Page extensions use addfirst, addlast, addafter, addbefore, modify and the move keywords.
- Page customization changes layout and actions for specific profiles only. It is more limited than a page extension (runtime 16). A profile object sets a role center and can link customizations.
- Extensible enums can be extended by other extensions through enumextension objects (2023 release wave 1).
- Reports support RDL, Word and Excel layouts plus request pages. XMLports import and export XML data. Queries join tables into datasets, and the query page mentions version 23.
- Permission sets can be composed with IncludedPermissionSets and ExcludedPermissionSets. Permission set extensions add permissions that are removed when the extension is uninstalled.
- Entitlements define object access by license or Microsoft Entra role, to support Marketplace transactability (2023 release wave 2). Control add-ins add scripts, stylesheets and images to pages.
Learn pages
- 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.
- Entitlement object: Discover how to define and use entitlement objects in AL for Business Central.
- Extensible Enums: Overview of the enumeration type and the concept of extending them.
- 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 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.
- In the observatory: Query 100 “Top Customer Overview”
- 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.
- In the observatory: Table 18 “Customer”
- 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.
- In the observatory: Table 18 “Customer”
- Table object: This article describes the structure, object limits, and extensibility of the table object in AL for Business Central.
- XMLport object: XMLport objects are used to export and import data between an external source and Business Central.
Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.