---
id: object/table/381
type: object
title: Table 381 "VAT Registration No. Format"
summary: Table 381 "VAT Registration No. Format" in Base Application (Microsoft.Finance.VAT.Registration). 3 fields, 2 public procedures, 14 events. Present since at least BC23, still in BC30, changed in BC24, BC26, BC28.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "28"
  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: 6acc8116fa0501cbfa78b9d9ecb766a5b1a3ac4818dc776b10eff7943940d77a
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/Finance/VAT/Registration/VATRegistrationNoFormat.Table.al
    title: src/Layers/W1/BaseApp/Finance/VAT/Registration/VATRegistrationNoFormat.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn:
    - https://learn.microsoft.com/dynamics365/business-central/finance-how-validate-vat-registration-number
    - https://learn.microsoft.com/dynamics365/business-central/finance-setup-vat
  objects: []
  features: []
  topics:
    - topic/business-central/business-functionality/finance/working-with-value-added-tax-vat
    - topic/business-central/business-functionality/finance/working-with-value-added-tax-vat/set-up-vat
    - topic/business-central/business-functionality/set-up-business-central/set-up-finance
  localizations:
    - localization/es
    - localization/it
    - localization/nl
    - localization/ru
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 381
name: VAT Registration No. Format
namespace: Microsoft.Finance.VAT.Registration
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "26"
  - "28"
source_major: "29"
obsolete: null
countries:
  - es
  - it
  - nl
  - ru
ms_search_form_ids: []
counts:
  fields: 3
  procedures: 22
  events: 14
  subscribers: 0
relations:
  out: 1
  referenced_by: 0
  pages: 1
  extended_by: 0
  event_subscribers: 0
  calls: 0
  called_by: 0
  implements: 0
---

# Table 381 "VAT Registration No. Format"

> Table 381 "VAT Registration No. Format" in Base Application (Microsoft.Finance.VAT.Registration). 3 fields, 2 public procedures, 14 events. Present since at least BC23, still in BC30, changed in BC24, BC26, BC28.

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

Learn documents this table through its pages: [Page 575 "VAT Registration No. Formats"](../page/575.md) (2 Learn pages).

## Properties

| Property | Value |
|---|---|
| Caption | VAT Registration No. Format |
| 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 | Country/Region Code | Code[10] | Specifies the country/region of the address. | TableRelation [Table 9 "Country/Region"](../table/9.md) (Country/Region); not editable; NotBlank |
| 2 | Line No. | Integer | — |  |
| 3 | Format | Text[20] | Specifies a format for a country's/region's VAT registration number. |  |

## Keys

- Key1: Country/Region Code, Line No. (clustered)

## Events published

- `OnBeforeCheckCust(VATRegNo: Text[20]; Number: Code[20]; var IsHandled: Boolean)` (integration): Integration event raised before validating customer VAT registration number for duplicates.
- `OnBeforeShowCheckCustMessage(TextString: Text; var IsHandled: Boolean)` (integration): Integration event raised before displaying customer VAT registration number duplicate warning message.
- `OnBeforeShowCheckVendMessage(TextString: Text; var IsHandled: Boolean)` (integration): Integration event raised before displaying vendor VAT registration number duplicate warning message.
- `OnBeforeCheckVend(VATRegNo: Text[20]; Number: Code[20]; var IsHandled: Boolean)` (integration): Integration event raised before validating vendor VAT registration number for duplicates.
- `OnBeforeCheckContact(VATRegNo: Text[20]; Number: Code[20]; var IsHandled: Boolean)` (integration): Integration event raised before validating contact VAT registration number for duplicates.
- `OnBeforeTest(VATRegNo: Text[20]; CountryCode: Code[10]; Number: Code[20]; TableID: Option; Check: Boolean; var IsHandled: Boolean)` (integration): Integration event raised before VAT registration number format validation begins.
- `OnCheckContactOnBeforeCheck(VATRegNo: Text[20]; Number: Code[20]; TextString: Text; var Check: Boolean)` (integration): Integration event raised before contact VAT registration number duplicate validation.
- `OnCheckCustOnBeforeCustFindSet(var Customer: Record Customer)` (integration): Integration event raised before customer record filtering for VAT registration number duplicate checking.
- `OnCheckCustOnBeforeCheck(VATRegNo: Text[20]; Number: Code[20]; TextString: Text; var Check: Boolean)` (integration): Integration event raised before customer VAT registration number duplicate validation.
- `OnCheckVendOnBeforeVendFindSet(var Vendor: Record Vendor)` (integration): Integration event raised before vendor record filtering for VAT registration number duplicate checking.
- `OnCheckVendorOnBeforeCheck(VATRegNo: Text[20]; Number: Code[20]; TextString: Text; var Check: Boolean)` (integration): Integration event raised before vendor VAT registration number duplicate validation.
- `OnTestTable(VATRegNo: Text[20]; CountryCode: Code[10]; Number: Code[20]; TableID: Option)` (integration): Integration event raised during VAT registration number validation for custom table types.
- `OnConstructErrorMessageIfNotCheck(ErrorMessageLbl: Text; Number: Code[20]; TableID: Option; var ErrorMsg: Text; var IsHandled: Boolean)` (integration): Integration event raised to construct custom error message for VAT registration number validation failures.
- `OnCheckContactOnBeforeContactFindSet(var Contact: Record Contact)` (integration): Integration event raised before contact record filtering for VAT registration number duplicate checking.

## Procedures

- `Test(VATRegNo: Text[20]; CountryCode: Code[10]; Number: Code[20]; TableID: Option): Boolean`: Validates VAT registration number format and checks for duplicates across customer, vendor, and contact records.
- `Compare(VATRegNo: Text[20]; Format: Text[20]): Boolean`: Compares VAT registration number against specified format pattern using wildcard matching.

Plus 6 local procedures.

## Relations

- Country/Region Code: TableRelation [Table 9 "Country/Region"](../table/9.md)

## Pages and codeunits on this table

- [Page 575 "VAT Registration No. Formats"](../page/575.md) (source table)

## Across versions

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

## Countries that replace it

[ES](../../localizations/es.md), [IT](../../localizations/it.md), [NL](../../localizations/nl.md), [RU](../../localizations/ru.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). 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: "VAT Registration No. Format")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
