Examples
Worked examples of extending the Business Central base application: dates, currency exchange rate adjustments, templates, document sharing, email, error messages, invoice posting, item charges, pricing, Shopify, Data Archive and e-documents. Use it to find which events, interfaces, enums and codeunits to use for a given extension scenario.
Path: Development > Extensibility > Extending the base application > Examples · tier official · system development · narrative reviewed (checked by Opus)
Overview
This section collects example-driven pages on extending specific areas of the base application. Each page covers one area and names the extension points to use, such as table and page extensions, event subscribers, interfaces, enums and codeunits. There are no subtopics, so all content sits on these pages.
The pages fall into groups. Finance and posting: currency exchange rate adjustments, G/L entry aggregation on invoice posting, item charge distribution and price calculations. Data and setup: Date virtual table replacements, customer, vendor and item templates, and the Data Archive extension. Communication and integration: email, document sharing with OneDrive, error messages with recommendations, the Shopify Connector and e-documents.
Start with the page that matches your area. Some pages center on implementing interfaces and enums: Invoice Posting, ErrorMessageFix, email connectors, price calculations and e-documents. Others center on subscribing to events, such as OnAfterCalcLine for Date buffer tables and the Item Charge Assignment codeunits. The Data Archive page uses methods on the Data Archive codeunit. The Shopify page describes per-tenant, hybrid and co-development approaches.
Key points
- Pages formerly based on the Date virtual table now use buffer tables. Extend them with a table extension on the buffer table and a subscriber to OnAfterCalcLine.
- Currency exchange rate adjustment objects were introduced in 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 to templates and creating new templates for primary tables.
- Document Sharing and OneDrive for Business extensions use the Document Sharing module of the system application and the Document Service Management codeunit (2022 release waves 1 and 2).
- Email extensions cover scenarios, address book lookup, view policies and connectors, including the Microsoft 365 and Current User connectors.
- Actionable error messages are built by implementing the ErrorMessageFix interface and subscribing to error events.
- G/L entry aggregation on invoice posting is customized by implementing the Invoice Posting interface for sales, purchase and service documents.
- Custom item charge distribution methods, alongside equally, by amount and by weight, are added by subscribing to events in the Item Charge Assignment codeunits.
Learn pages
- Extend Pages Based on the Date Virtual Table: Learn how to extend Business Central pages that previously used the Date virtual table, by extending the buffer table and subscribing to the OnAfterCalcLine event.
- Extending currency exchange rate adjustments: Explore opportunities to add capabilities to exchange rate adjustments.
- Extending Customer, Vendor, and Item Templates: How you extend templates in Dynamics 365 Business Central.
- Extending Document Sharing and OneDrive for Business: Learn how the document sharing capability is used with OneDrive for Business, and how you can extend it.
- Extending Email: Learn how to extend the email capabilities in Business Central.
- Extending error messages with recommendations: Overview of how you can extend the error messages with recommendations framework to reduce friction for users of Business Central.
- Extending G/L entry aggregations when posting invoices: Explore an example of how to extend the posting process for sales, purchase, and service documents.
- Extending Item Charges Distribution Methods: How you extend item charges in Dynamics 365 Business Central.
- Extending Price Calculations: How you extend the price calculations in Dynamics 365 Business Central.
- Extending Shopify: Discover extensibility options for the Shopify Connector, including event subscriptions, API interactions, and co-development contributions.
- Extending the Data Archive extension: Overview and examples of how to enable your app to archive data.
- Extending the e-documents functionality: Learn how to extend e-documents functionality with specific requirements.
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.
- Page 4500 “Current User Email Account” · on Table 4508 “Email - Outlook Account”
- Page 4503 “Microsoft 365 Email Account” · on Table 4508 “Email - Outlook Account”
- Page 4504 “Microsoft 365 Email Wizard” · captioned “Set up Microsoft 365 email account” · on Table 4508 “Email - Outlook Account”
- Page 4511 “SMTP Account Wizard” · captioned “Set up SMTP Account” · on Table 4511 “SMTP Account”
- Page 4512 “SMTP Account” · on Table 4511 “SMTP Account”
- Page 6103 “E-Document Services” · on Table 6103 “E-Document Service”
- Page 6133 “E-Document Service” · on Table 6103 “E-Document Service”
Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.
What Learn documents here 8 of 12 Learn pages
- learnExtend Pages Based on the Date Virtual Table2026-08-24
- learnExtending currency exchange rate adjustments2023-12-28
- learnExtending Customer, Vendor, and Item Templates2021-10-14
- learnExtending Document Sharing and OneDrive for Business2021-10-01
- learnExtending Email2022-05-19
- learnExtending error messages with recommendations2025-11-17
- learnExtending G/L entry aggregations when posting invoices2024-01-03
- learnExtending Item Charges Distribution Methods2021-04-01