Extensibility overview

AL developers can extend the functionality of Business Central in several ways. They can extend tables, enumerations, application areas, pages, reports, code flows and the security model. They can also contribute directly to the base application in the open source projects for the system application modules.

This article provides an overview of the extensibility options available to AL developers in Business Central including examples on how to extend various features, such as extending item charges, best price calculations, and data archiving.

Extending AL objects and artifacts

The AL object model in Business Central supports many different ways for developers to extend objects and artifacts in an app.

  1. Extending Code Flows: Codeunits contain AL code that can be reused across the application. Developers can subscribe to events in base app codeunits and write custom logic to extend the application's functionality. See Extending AL code flows: events.

  2. Extending Tables: AL developers can add new fields to existing tables or modify the properties of existing fields. This allows for customization of data structures to fit specific business needs. See Extending AL objects: tables.

  3. Extending Pages: Pages are the main way to display data in Business Central. Developers can add or modify fields, actions, and layout of existing pages or create new ones. See Extending AL objects: pages.

  4. Extending Reports: Reports provide a structured view of data and are essential for analysis and decision-making. Developers can extend existing reports by adding data items or columns, modifying request pages, or adding new layouts. See Extending AL objects: reports.

  5. Extending the Security Model: Permission sets define what actions a user can perform in Business Central. Developers can create new permission sets or extend existing ones to ensure users have appropriate access rights. See Extending AL objects: security model.

  6. Extending Enumerations: Enumerations, or Enums, are lists of constants that represent a set of values. Developers can extend existing Enums or create new ones to cater to unique business requirements. See Extending AL objects: enumerations.

  7. Extending Application Areas: Application areas help control the visibility of UI elements based on licensing and configuration. Developers can extend these areas to tailor the user interface according to business needs. See Extending AL objects: application areas.

Note

Extending API pages and queries isn't currently possible in Business Central.

Extending the Business Central application

The Business Central application consists of multiple layers

  • The System Application, which is a set of open source modules that make it easier to build, maintain, and easily upgrade on-premises and online apps. These modules let you focus on the business logic, and the needs of your users or customers.
  • The Base Application, which is the business logic for the functionality in Business Central.

Contributing to the Business Central open source System Application

If you want to contribute code to the Business Central open source System Application, you need to determine the type of contribution:

  1. Small bug fixes, product improvements, or customer conveniences; or
  2. New capabilities or larger changes to the existing application platform.

For more information about making contributions, go to Contributing to the Business Central open source System Application.

To learn more about the System Application, its module architecture, and how to modify or create new modules, go to Creating new modules in the system application.

Extending the Business Central base application

For more information on how to get started on extending functionality in the base application by extending AL objects and using events, see:

Extension objects in the same app

Note

This feature is available with runtime 13.0 and later and is enabled by default if you're targeting runtime 13.0 and later.

From runtime 13.0 and onwards, large applications have the ability to maintain a separation of concerns. This is achieved by permitting extension objects to coexist with their target within the same app. This facilitates the development of multiple extensions for a single target, all within the same app.

When table extensions live in the same app as their target, their fields and keys are integrated into the base table. This integration eliminates the need for SQL-joins during runtime.

All types of extension objects; enums, pages, reports, tables, and XMLports, can coexist with their target within the same app. This allows for various combinations, such as a single table with its table extension, a single page with multiple page extensions, multiple enum extensions, and so forth. This flexibility supports a wide range of application structures and functionalities.

Permitting extension objects to coexist with their target within the same app is useful for nondisruptive code refactoring within an app. It allows for dividing objects into modules based on specific functionalities, or for preparing to move objects into a separate app in anticipation of future releases.

With runtime 13.0, extension objects from a specific app are applied to the target based on the extension object ID. This introduces the following new compiler validations:

  • Base objects are prohibited from referencing members from extension objects.
  • An extension object can only reference members from other extension objects within the same app if the other extension object has a lower object ID.

Examples

There are numerous examples available that demonstrate how to extend various features in Business Central:

  • Extending item charges
  • Extending best price calculations
  • Extending pages based on date virtual table
  • Data archive extension
  • Extending document sharing with OneDrive
  • Extending templates
  • Extending email

These resources provide a comprehensive overview of the extensibility options available to AL developers in Business Central.

See Also

Extending AL objects and artifacts

Extending the base application

Examples