Skip to content

[Bug]: The demo country/region setup for Northern Ireland uses the wrong ISO country code. #29496

@SchulzOli

Description

@SchulzOli

Describe the issue

In the Contoso Coffee Demo Dataset app, the demo country/region setup for Northern Ireland uses the wrong ISO country code.

Current line (linking to the repo for reference):

ContosoCountryOrRegion.InsertCountryOrRegion(NI(), NothernIrelandLbl, CopyStr(GB(), 1, 2), '826', GBNTok, GBNTok, Enum::"Country/Region Address Format"::"City+County+Post Code", 1, '9932', '');

The ISO code parameter for Northern Ireland currently resolves to GB. (written as GBN, but the Code field is only 2 chars long)
For VAT / EORI / Intrastat / EU-goods trade, Northern Ireland must use the ISO 3166-1 alpha-2 temporary code XI, not GB.

Using GB for Northern Ireland:
breaks the uniqueness of ISO codes if an app expects one ISO code per country/region, and
is inconsistent with how Northern Ireland is treated in customs, VAT and EU goods trade after Brexit.

Authoritative guidance:
UK government guidance: to trade goods between Northern Ireland and the EU, businesses need a VAT registration number starting with XI.
GOV.UK

ISO 3166-1 alpha-2: the code XI is used by the UK government and the EU as the country code prefix for Northern Ireland in EORI and EU VAT reporting.
Wikipedia

VAT references: XI is described as the “ISO 3166-1 alpha-2 temporary country code” for Northern Ireland VAT numbers used in EU trade in goods.
verifyvat.com

Expected behavior

The Northern Ireland demo country/region should use XI as ISO code (or the corresponding label/lookup that resolves to XI) so that demo data matches the current ISO- and VAT-related practice for NI.

Steps to reproduce

  1. Create a new demo company in Business Central using the Contoso Coffee Demo Data app (Contoso Coffee Demo Dataset).
  2. Let the initialization run so that demo data is created, including countries/regions
  3. Open the Country/Region table in the new demo company.
  4. Locate the entry for Northern Ireland (NothernIrelandLbl in the code).
  5. Observe that the ISO Code (and related token) corresponds to GB instead of XI.

Result:
Northern Ireland demo data is created with ISO/VAT code GB.

Additional context

We found this while implementing and validating uniqueness of ISO codes for countries/regions in our own Business Central app. Northern Ireland and the United Kingdom currently end up sharing the same ISO code (GB) in the demo data, which breaks assumptions about uniqueness and leads to incorrect behaviour in ISO-based logic (especially VAT/EU reporting logic).

I will provide a fix for a bug

  • I will provide a fix for a bug

Metadata

Metadata

Assignees

Labels

IntegrationGitHub request for Integration areaapprovedThe issue is approved

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions