---
id: post/aardvarklabs-blog/3928
type: post
title: Understanding Business Central’s Format Address Codeunit
summary: Codeunit 365 (Format Address) handles address formatting across Business Central for customers, vendors, and contacts, applying global postal rules based on country configuration. The post explains its architecture, extensibility through integration events, and demonstrates how to extend it with custom logic for compliance or data correction.
tier: community
language: en
tags:
  - address formatting
  - codeunit architecture
  - integration events
  - extensibility
  - global postal rules
  - country-specific logic
system: platform
review:
  state: reviewed
  by: opus
  at: "2026-10-07T23:47:50.436Z"
  flags: []
generated:
  at: "2026-10-07T22:42:12.892Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 5a57564037e7481f2328d3363ab31d37fd1ccfe0911098c0d195c3dfc4f43143
evidence:
  - kind: blog
    url: https://aardvarklabs.blog/2026/09/04/understanding-business-centrals-format-address-codeunit/
    title: Understanding Business Central’s Format Address Codeunit
    date: "2026-09-04"
    commit: null
    t: null
    quote: null
links:
  learn: []
  objects:
    - object/codeunit/365
    - object/table/18
    - object/table/23
    - object/table/5050
    - object/table/36
    - object/table/14
    - object/table/98
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "3928"
source_id: aardvarklabs-blog
source_name: Aardvark Labs
url: https://aardvarklabs.blog/2026/09/04/understanding-business-centrals-format-address-codeunit/
published_at: "2026-09-04T12:00:00.000Z"
author: Marcel Chabot
full_text: false
words: 984
quotes: []
code_objects_mentioned:
  - codeunit Format Address
  - table Country Region
  - table Customer
  - table Vendor
  - table Contact
  - table Sales Header
  - table Location
  - table General Ledger Setup
systems:
  - platform
  - localization
versions_mentioned: []
preview:
  embeddable: true
  frame_url: https://aardvarklabs.blog/2026/09/04/understanding-business-centrals-format-address-codeunit/embed/
  image: https://i0.wp.com/aardvarklabs.blog/wp-content/uploads/2026/08/copilot_20260818_232321.png?fit=1200%2C800&ssl=1
  image_alt: null
  image_w: 1200
  image_h: 800
  site_name: Aardvark Labs
  favicon: https://aardvarklabs.blog/wp-content/uploads/2024/04/design-1.png?w=32
  probed_at: "2026-10-07T11:50:09.686Z"
---

# Understanding Business Central’s Format Address Codeunit

[Read the post](https://aardvarklabs.blog/2026/09/04/understanding-business-centrals-format-address-codeunit/) · Aardvark Labs (Marcel Chabot) · 2026-09-04 · 984 words · tier community · reviewed (checked by Opus)

> Codeunit 365 (Format Address) handles address formatting across Business Central for customers, vendors, and contacts, applying global postal rules based on country configuration. The post explains its architecture, extensibility through integration events, and demonstrates how to extend it with custom logic for compliance or data correction.

## Key points

- Format Address reads country-specific formatting rules from the Country Region table, making behavior configurable and safe for localization
- The codeunit is highly extensible with OnBefore integration events on each record-specific procedure, allowing custom logic without modifying core behavior
- Each formatted address returns an array of 8 text elements, with the 8th element intentionally left empty for extension use
- Custom extensions can hook into the formatting process to clean data, add location details, or apply region-specific rules without editing reports

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- [codeunit 365 "Format Address"](../../objects/codeunit/365.md)
- table "Country Region"
- [table 18 "Customer"](../../objects/table/18.md)
- [table 23 "Vendor"](../../objects/table/23.md)
- [table 5050 "Contact"](../../objects/table/5050.md)
- [table 36 "Sales Header"](../../objects/table/36.md)
- [table 14 "Location"](../../objects/table/14.md)
- [table 98 "General Ledger Setup"](../../objects/table/98.md)

Not found in BC28-30: table "Country Region".

## Context

- Features: address formatting, country-specific postal rules, integration events, extensibility hooks, location-based details, multi-record type support

Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
