topic hubAL Developmentofficial - Microsoftreviewed - checked by Opus

Objects

AL object types in Business Central: codeunits, pages, page extensions, tables, table extensions, keys, enums, queries, reports, XMLports, control add-ins, profiles, entitlements and permission sets. It answers questions about what each object does, its key properties, and how to extend or customize it.

Path: Development > The AL programming language > Objects · tier official · system development · narrative reviewed (checked by Opus)

Overview

This section describes the object types you write in AL. Each page covers one object type, its syntax and its main properties. The types fall into groups: data (table, table extension, table keys, extensible enums, query), 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).

Extension-related pages show how to change existing objects without editing the base. Page extensions add or move controls and actions, page customizations apply limited layout changes to specific profiles, table extensions add fields, keys and triggers, and permission set extensions add permissions. Profiles tie a role center to optional page customizations.

Start with the Table object and Page object pages for the basics. Then read the extension pages for the object you want to change, and the Codeunit page for business logic. Use the permission set and entitlement pages when you package or monetize an app.

Key points

  • Codeunits hold reusable business logic and procedures, and can use an OnRun trigger.
  • Page extensions use keywords such as addfirst, addlast, addafter, addbefore, modify and the move keywords. Page customizations are more limited: they have no variables, procedures or triggers and apply to specified profiles.
  • Table objects cover fields, keys, triggers and the Extensible property. Table extensions add fields, keys and trigger code without changing the base table.
  • Table keys can be primary or secondary, unique or clustered, and can include extra fields with IncludedFields.
  • Extensible enums can be extended through enumextension objects and used as table fields, variables and parameters.
  • Reports support RDL, Word and Excel layouts plus request pages. XMLports import and export XML data. Queries join data from several tables through dataitems and columns.
  • Control add-ins show custom HTML, CSS and JavaScript content in iframes on pages, set with properties such as Scripts, StartupScript, StyleSheet and Images.
  • Permission sets can be composed with included and excluded sets, and permission set extensions add permissions on install. Entitlements define object access by license or Microsoft Entra role, to support Marketplace app transactability.

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: Description of the permission set extension object in AL for Business Central.
  • 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.
  • 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.
  • 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.

What Learn documents here 8 of 16 Learn pages

Show 8 more