topic hubAL Developmentofficial - Microsoftunreviewed - model text not yet checked

Examples

Worked examples for extending the Business Central base application. They cover pages on buffer tables, exchange rate adjustments, templates, document sharing, email, error messages, invoice posting, item charges, price calculation, Shopify, Data Archive and e-documents. Use them to find which events, interfaces and codeunits to extend for a given area.

Path: Development > Extensibility > Extending the base application > Examples · tier official · system development · narrative unreviewed (model text not yet checked)

Overview

This section is a set of standalone how-to pages. Each one shows how to extend one area of the base application. They use table and page extensions, event subscribers, interfaces and enums. The pages don’t depend on each other, so pick the one that matches your scenario.

Some pages describe extension points through interfaces and enums. Examples are Invoice Posting for G/L entry aggregation, the ErrorMessageFix interface for actionable errors, and the price calculation setup. Others rely on events. Examples are OnAfterCalcLine for pages that used the Date virtual table, and the Item Charge Assignment codeunits for new distribution methods. Several pages target larger frameworks: email (scenarios, connectors, view policies), document sharing with OneDrive, Shopify, and e-documents for localization and ISV apps.

Start with the page for the area you want to change. Check the version notes where they exist, such as 2023 release wave 2 for currency exchange rate adjustments and 2025 release wave 1 for e-documents.

Key points

  • Pages formerly based on the Date virtual table now use buffer tables. Extend the buffer table and subscribe to OnAfterCalcLine.
  • Currency exchange rate adjustment has new objects since 2023 release wave 2. They add preview entries, detailed history and support for regional compliance.
  • Customer, vendor and item templates can be extended by adding fields and creating new templates for the primary tables.
  • Document Sharing and OneDrive for Business use the Document Sharing module and the Document Service Management codeunit. You can plug in OneDrive or a custom document service.
  • Email can be extended with custom scenarios, address book lookups, view policies and connectors. The Microsoft 365 and Current User connectors are named.
  • Actionable error messages use the ErrorMessageManagement codeunit and the ErrorMessageFix interface. They support drill-down and bulk actions on the Error Messages page.
  • G/L entry aggregation when posting invoices is customized by implementing the Invoice Posting interface for sales, purchase and service documents.
  • Item charge distribution methods (equally, by amount, by weight) are extended through events in the Item Charge Assignment codeunits.

Learn pages

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 12 Learn pages

Show 4 more