---
id: object/table/225
type: object
title: Table 225 "Post Code"
summary: Table 225 "Post Code" in Base Application (Microsoft.Foundation.Address). 6 fields, 9 public procedures, 13 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28-29.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "29"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 27ad1bf86d449c6c71d3fa2786e8cd965b6977e8e12b1896f617d9b085b1570a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Foundation/Address/PostCode.Table.al
    title: src/Layers/W1/BaseApp/Foundation/Address/PostCode.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/sales-how-register-new-customers
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/sales
    - topic/business-central/business-functionality/set-up-business-central/set-up-sales
  localizations:
    - localization/au
    - localization/ch
    - localization/es
    - localization/nz
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 225
name: Post Code
namespace: Microsoft.Foundation.Address
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "28"
  - "29"
source_major: "29"
obsolete: null
countries:
  - au
  - ch
  - es
  - nz
ms_search_form_ids: []
counts:
  fields: 6
  procedures: 24
  events: 13
  subscribers: 0
relations:
  out: 2
  referenced_by: 258
  pages: 1
  extended_by: 1
  event_subscribers: 0
  calls: 1
  called_by: 0
  implements: 0
---

# Table 225 "Post Code"

> Table 225 "Post Code" in Base Application (Microsoft.Foundation.Address). 6 fields, 9 public procedures, 13 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28-29.

Base Application · Microsoft.Foundation.Address · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Foundation/Address/PostCode.Table.al) · facts from BC29

Learn documents this table through its pages: [Page 367 "Post Codes"](../page/367.md) (1 Learn page).

## Properties

| Property | Value |
|---|---|
| Caption | Post Code |
| DataClassification | CustomerContent |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Code | Code[20] | Specifies the postal code that is associated with a city. | NotBlank |
| 2 | City | Text[30] | Specifies the city linked to the postal code in the Code field. | NotBlank |
| 3 | Search City | Code[30] | — |  |
| 4 | Country/Region Code | Code[10] | Specifies the country/region of the address. | TableRelation [Table 9 "Country/Region"](../table/9.md) (Country/Region) |
| 5 | County | Text[30] | Specifies a county name. |  |
| 30 | Time Zone | Text[180] | Specifies the time zone for the selected post code. |  |

## Keys

- Key1: Code, City (clustered)
- Key2: City, Code
- Key3: Search City
- Key4: Country/Region Code

## Events published

- `OnAfterValidateCity(var PostCodeRec: Record "Post Code"; var CityTxt: Text[30]; var PostCode: Code[20]; var CountyTxt: Text[30]; var CountryCode: Code[10]; UseDialog: Boolean)` (integration)
- `OnAfterValidatePostCode(var PostCodeRec: Record "Post Code"; var CityTxt: Text[30]; var PostCode: Code[20]; var CountyTxt: Text[30]; var CountryCode: Code[10]; UseDialog: Boolean)` (integration)
- `OnBeforeCheckClearPostCodeCityCounty(var CityTxt: Text; var PostCode: Code[20]; var CountyTxt: Text; var CountryCode: Code[10]; xCountryCode: Code[10]; var IsHandled: Boolean)` (integration)
- `OnBeforeLookupPostCode(var CityTxt: Text; var PostCode: Code[20]; var CountyTxt: Text; var CountryCode: Code[10]; var IsHandled: Boolean)` (integration)
- `OnBeforeValidateCityProcedure(var CityTxt: Text[30]; var PostCode: Code[20]; var CountyTxt: Text[30]; var CountryCode: Code[10]; UseDialog: Boolean; var IsHandled: Boolean)` (integration)
- `OnBeforeValidateCityField(var PostCode: Record "Post Code"; xPostCode: Record "Post Code"; var IsHandled: Boolean)` (integration)
- `OnBeforeValidateCode(var PostCode: Record "Post Code"; xPostCode: Record "Post Code"; var IsHandled: Boolean)` (integration)
- `OnBeforeValidateCountryCode(var CityTxt: Text[30]; var PostCode: Code[20]; var CountyTxt: Text[30]; var CountryCode: Code[10]; var IsHandled: Boolean)` (integration)
- `OnBeforeValidatePostCode(var CityTxt: Text[30]; var PostCode: Code[20]; var CountyTxt: Text[30]; var CountryCode: Code[10]; var UseDialog: Boolean; var IsHandled: Boolean)` (integration)
- `OnValidatePostCodeOnAfterSetFilters(var PostCodeRec: Record "Post Code")` (integration)
- `OnValidateCityOnAfterSelectPostCode(var PostCodeRec: Record "Post Code"; var CityTxt: Text[30]; var PostCode: Code[20]; var CountyTxt: Text[30]; var CountryCode: Code[10]; UseDialog: Boolean)` (integration)
- `OnValidatePostCodeOnAfterSelectPostCode(var PostCodeRec: Record "Post Code"; var CityTxt: Text[30]; var PostCode: Code[20]; var CountyTxt: Text[30]; var CountryCode: Code[10]; UseDialog: Boolean)` (integration)
- `OnLookupPostCodeOnAfterSelectPostCode(var PostCodeRec: Record "Post Code")` (integration)

## Procedures

- `ValidateCity(var CityTxt: Text[30]; var PostCode: Code[20]; var CountyTxt: Text[30]; var CountryCode: Code[10]; UseDialog: Boolean)`
- `ValidatePostCode(var CityTxt: Text[30]; var PostCode: Code[20]; var CountyTxt: Text[30]; var CountryCode: Code[10]; UseDialog: Boolean)`
- `UpdateFromSalesHeader(SalesHeader: Record "Sales Header"; PostCodeChanged: Boolean)`
- `UpdateFromCustomer(Customer: Record Customer; PostCodeChanged: Boolean)`
- `UpdateFromCompanyInformation(CompanyInformation: Record "Company Information"; PostCodeChanged: Boolean)`
- `UpdateFromStandardAddress(StandardAddress: Record "Standard Address"; PostCodeChanged: Boolean)`
- `ValidateCountryCode(var CityTxt: Text[30]; var PostCode: Code[20]; var CountyTxt: Text[30]; var CountryCode: Code[10])`
- `CheckClearPostCodeCityCounty(var CityTxt: Text; var PostCode: Code[20]; var CountyTxt: Text; var CountryCode: Code[10]; xCountryCode: Code[10])`
- `LookupPostCode(var CityTxt: Text; var PostCode: Code[20]; var CountyTxt: Text; var CountryCode: Code[10])`

Plus 2 local procedures.

## Relations

- lookup page [Page 367 "Post Codes"](../page/367.md)
- Country/Region Code: TableRelation [Table 9 "Country/Region"](../table/9.md)

## Referenced by

258 fields in 65 objects relate to this table (TableRelation or CalcFormula).

- [Table 1001 "Job Task"](../table/1001.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 110 "Sales Shipment Header"](../table/110.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 112 "Sales Invoice Header"](../table/112.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 114 "Sales Cr.Memo Header"](../table/114.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 120 "Purch. Rcpt. Header"](../table/120.md): Buy-from City, Buy-from Post Code, Pay-to City, Pay-to Post Code, Ship-to City, Ship-to Post Code
- [Table 122 "Purch. Inv. Header"](../table/122.md): Buy-from City, Buy-from Post Code, Pay-to City, Pay-to Post Code, Ship-to City, Ship-to Post Code
- [Table 124 "Purch. Cr. Memo Hdr."](../table/124.md): Buy-from City, Buy-from Post Code, Pay-to City, Pay-to Post Code, Ship-to City, Ship-to Post Code
- [Table 167 "Job"](../table/167.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 36 "Sales Header"](../table/36.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 38 "Purchase Header"](../table/38.md): Buy-from City, Buy-from Post Code, Pay-to City, Pay-to Post Code, Ship-to City, Ship-to Post Code
- [Table 5107 "Sales Header Archive"](../table/5107.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 5109 "Purchase Header Archive"](../table/5109.md): Buy-from City, Buy-from Post Code, Pay-to City, Pay-to Post Code, Ship-to City, Ship-to Post Code
- [Table 5135 "Job Archive"](../table/5135.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 5136 "Job Task Archive"](../table/5136.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 5475 "Sales Invoice Entity Aggregate"](../table/5475.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 5477 "Purch. Inv. Entity Aggregate"](../table/5477.md): Buy-from City, Buy-from Post Code, Pay-to City, Pay-to Post Code, Ship-to City, Ship-to Post Code
- [Table 5495 "Sales Order Entity Buffer"](../table/5495.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 5496 "Purchase Order Entity Buffer"](../table/5496.md): Buy-from City, Buy-from Post Code, Pay-to City, Pay-to Post Code, Ship-to City, Ship-to Post Code
- [Table 5505 "Sales Quote Entity Buffer"](../table/5505.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 5900 "Service Header"](../table/5900.md): Bill-to City, Bill-to Post Code, City, Post Code, Ship-to City, Ship-to Post Code
- [Table 5970 "Filed Service Contract Header"](../table/5970.md): Bill-to City, Bill-to Post Code, City, Post Code, Ship-to City, Ship-to Post Code
- [Table 5990 "Service Shipment Header"](../table/5990.md): Bill-to City, Bill-to Post Code, City, Post Code, Ship-to City, Ship-to Post Code
- [Table 5992 "Service Invoice Header"](../table/5992.md): Bill-to City, Bill-to Post Code, City, Post Code, Ship-to City, Ship-to Post Code
- [Table 5994 "Service Cr.Memo Header"](../table/5994.md): Bill-to City, Bill-to Post Code, City, Post Code, Ship-to City, Ship-to Post Code
- [Table 6010 "Service Header Archive"](../table/6010.md): Bill-to City, Bill-to Post Code, City, Post Code, Ship-to City, Ship-to Post Code
- [Table 6650 "Return Shipment Header"](../table/6650.md): Buy-from City, Buy-from Post Code, Pay-to City, Pay-to Post Code, Ship-to City, Ship-to Post Code
- [Table 6660 "Return Receipt Header"](../table/6660.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 8052 "Customer Subscription Contract"](../table/8052.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code, Ship-to City, Ship-to Post Code
- [Table 8057 "Subscription Header"](../table/8057.md): Bill-to City, Bill-to Post Code, End-User City, End-User Post Code, Ship-to City, Ship-to Post Code
- [Table 5507 "Sales Cr. Memo Entity Buffer"](../table/5507.md): Bill-to City, Bill-to Post Code, Sell-to City, Sell-to Post Code
- [Table 5508 "Purch. Cr. Memo Entity Buffer"](../table/5508.md): Buy-from City, Buy-from Post Code, Pay-to City, Pay-to Post Code
- [Table 5740 "Transfer Header"](../table/5740.md): Transfer-from City, Transfer-from Post Code, Transfer-to City, Transfer-to Post Code
- [Table 5744 "Transfer Shipment Header"](../table/5744.md): Transfer-from City, Transfer-from Post Code, Transfer-to City, Transfer-to Post Code
- [Table 5746 "Transfer Receipt Header"](../table/5746.md): Transfer-from City, Transfer-from Post Code, Transfer-to City, Transfer-to Post Code
- [Table 79 "Company Information"](../table/79.md): City, Post Code, Ship-to City, Ship-to Post Code
- [Table 8063 "Vendor Subscription Contract"](../table/8063.md): Buy-from City, Buy-from Post Code, Pay-to City, Pay-to Post Code
- [Table 5940 "Service Item"](../table/5940.md): Post Code, City, Ship-to City
- [Table 14 "Location"](../table/14.md): City, Post Code
- [Table 156 "Resource"](../table/156.md): City, Post Code
- [Table 18 "Customer"](../table/18.md): City, Post Code
- [Table 222 "Ship-to Address"](../table/222.md): City, Post Code
- [Table 2224 "Remit Address"](../table/2224.md): City, Post Code
- [Table 224 "Order Address"](../table/224.md): City, Post Code
- [Table 23 "Vendor"](../table/23.md): City, Post Code
- [Table 270 "Bank Account"](../table/270.md): City, Post Code
- [Table 287 "Customer Bank Account"](../table/287.md): City, Post Code
- [Table 288 "Vendor Bank Account"](../table/288.md): City, Post Code
- [Table 295 "Reminder Header"](../table/295.md): City, Post Code
- [Table 297 "Issued Reminder Header"](../table/297.md): City, Post Code
- [Table 302 "Finance Charge Memo Header"](../table/302.md): City, Post Code
- and 15 more objects (27 fields): data/code/relations/29.json

## Pages and codeunits on this table

- [Page 367 "Post Codes"](../page/367.md) (source table)

## Extended by

- [Table extension 7250 "MDM Post Code"](../tableextension/7250.md)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Page 367 "Post Codes"](../page/367.md) (2 calls: `ValidateCity → (object)`, `ValidatePostCode → (object)`)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC28-29

## Countries that replace it

[AU](../../localizations/au.md), [CH](../../localizations/ch.md), [ES](../../localizations/es.md), [NZ](../../localizations/nz.md)

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "table", object_name: "Post Code")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
