---
id: topic/dev-itpro/development/extensibility/extending-the-base-application/examples
type: topic
title: Examples
summary: "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."
tier: official
language: en
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-07T02:19:44.651Z"
  flags: []
generated:
  at: "2026-10-08T00:04:31.553Z"
  pipeline: 0.2.0
  prompts:
    hub-topic: 1
  input_hash: 44f7b981b46ef98d9d91632b0a8575c1f798c59a22346da73a4636be00a6b028
evidence:
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extend-pages-based-on-date-virtual-table
    title: Extend Pages Based on the Date Virtual Table
    date: "2026-08-24"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extend-exchange-rates
    title: Extending currency exchange rate adjustments
    date: "2023-12-28"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-templates
    title: Extending Customer, Vendor, and Item Templates
    date: "2021-10-14"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-document-sharing-onedrive
    title: Extending Document Sharing and OneDrive for Business
    date: "2021-10-01"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-email
    title: Extending Email
    date: "2022-05-19"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extension-errors-recommendations
    title: Extending error messages with recommendations
    date: "2025-11-17"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-invoice-posting-example
    title: Extending G/L entry aggregations when posting invoices
    date: "2024-01-03"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-item-charges
    title: Extending Item Charges Distribution Methods
    date: "2021-04-01"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-best-price-calculations
    title: Extending Price Calculations
    date: "2021-04-01"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-shopify
    title: Extending Shopify
    date: "2026-09-03"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-data-archive-extension
    title: Extending the Data Archive extension
    date: "2023-12-21"
    commit: null
    t: null
    quote: null
  - kind: learn
    url: https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extend-edocuments
    title: Extending the e-documents functionality
    date: "2025-01-27"
    commit: null
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extend-pages-based-on-date-virtual-table
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extend-exchange-rates
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-templates
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-document-sharing-onedrive
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-email
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extension-errors-recommendations
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-invoice-posting-example
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-item-charges
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-best-price-calculations
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-shopify
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-data-archive-extension
    - https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extend-edocuments
  objects:
    - object/page/4500
    - object/page/4503
    - object/page/4504
    - object/page/4511
    - object/page/4512
    - object/page/6103
    - object/page/6133
  features: []
  topics:
    - topic/dev-itpro/development/extensibility/extending-the-base-application
  localizations: []
  videos: []
  posts: []
  guidelines: []
learn_toc_path:
  - Development
  - Extensibility
  - Extending the base application
  - Examples
toc_file: dev-itpro/TOC.md
parent: topic/dev-itpro/development/extensibility/extending-the-base-application
children: []
coverage:
  learn: 12
  code: 7
  video: 0
  blog: 0
  guideline: 0
bc_forms:
  - 4500
  - 4503
  - 4504
  - 4511
  - 4512
  - 6103
  - 6133
member_hash: e8ef3c1bf44fc582ed3699829e07d007c301270a2f66be746810afb4b6e0b611
narrative: generated
---

# 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](../../../development.md) > [Extensibility](../../extensibility.md) > [Extending the base application](../extending-the-base-application.md) > 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](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extend-pages-based-on-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](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extend-exchange-rates): Explore opportunities to add capabilities to exchange rate adjustments.
- [Extending Customer, Vendor, and Item Templates](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-templates): How you extend templates in Dynamics 365 Business Central.
- [Extending Document Sharing and OneDrive for Business](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-document-sharing-onedrive): Learn how the document sharing capability is used with OneDrive for Business, and how you can extend it.
- [Extending Email](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-email): Learn how to extend the email capabilities in Business Central.
- [Extending error messages with recommendations](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extension-errors-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](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-invoice-posting-example): Explore an example of how to extend the posting process for sales, purchase, and service documents.
- [Extending Item Charges Distribution Methods](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-item-charges): How you extend item charges in Dynamics 365 Business Central.
- [Extending Price Calculations](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-best-price-calculations): How you extend the price calculations in Dynamics 365 Business Central.
- [Extending Shopify](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extending-shopify): Discover extensibility options for the Shopify Connector, including event subscriptions, API interactions, and co-development contributions.
- [Extending the Data Archive extension](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-data-archive-extension): Overview and examples of how to enable your app to archive data.
- [Extending the e-documents functionality](https://learn.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-extend-edocuments): 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"](../../../../../objects/page/4500.md) · on [Table 4508 "Email - Outlook Account"](../../../../../objects/table/4508.md)
- [Page 4503 "Microsoft 365 Email Account"](../../../../../objects/page/4503.md) · on [Table 4508 "Email - Outlook Account"](../../../../../objects/table/4508.md)
- [Page 4504 "Microsoft 365 Email Wizard"](../../../../../objects/page/4504.md) · captioned "Set up Microsoft 365 email account" · on [Table 4508 "Email - Outlook Account"](../../../../../objects/table/4508.md)
- [Page 4511 "SMTP Account Wizard"](../../../../../objects/page/4511.md) · captioned "Set up SMTP Account" · on [Table 4511 "SMTP Account"](../../../../../objects/table/4511.md)
- [Page 4512 "SMTP Account"](../../../../../objects/page/4512.md) · on [Table 4511 "SMTP Account"](../../../../../objects/table/4511.md)
- [Page 6103 "E-Document Services"](../../../../../objects/page/6103.md) · on [Table 6103 "E-Document Service"](../../../../../objects/table/6103.md)
- [Page 6133 "E-Document Service"](../../../../../objects/page/6133.md) · on [Table 6103 "E-Document Service"](../../../../../objects/table/6103.md)

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn's own.
