---
id: change/bcapps/13987
type: change
title: '#13987 [Main][All-e]"Specify the VAT registration number that you want to verify" error when entering a VAT Registration No. in the Sales Order if the Customer Card has no VAT Registration No'
summary: Fixed a VAT registration number validation error in Sales Orders where the system incorrectly validated the customer's stored VAT number instead of the number entered on the document when the customer card had no VAT number and the VIES validation service was enabled.
tier: official
language: en
tags:
  - fix
  - main
  - bc30
  - table sales header
system: sales
review:
  state: reviewed
  by: opus
  at: "2026-11-18T00:57:41.315Z"
  flags: []
generated:
  at: "2026-12-02T00:15:44.908Z"
  pipeline: 0.2.0
  prompts:
    extract-change: 1
  input_hash: c15eb4ea09936becf422e9abf2262b870f8c01bf
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/pull/13987
    title: 'microsoft/BCApps#13987: [Main][All-e]"Specify the VAT registration number that you want to verify" error when entering a VAT Registration No. in the Sales Order if the Customer Card has no VAT Registration No'
    date: "2026-11-17"
    commit: c15eb4ea09936becf422e9abf2262b870f8c01bf
    t: null
    quote: the field now passes a copy of the customer (CustomerToValidate) with the number entered on the document set
links:
  learn: []
  objects:
    - object/table/36
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes: []
  related:
    - to: https://learn.microsoft.com/dynamics365/business-central/finance-how-use-multiple-vat-registrations
      title: Use Multiple Customer VAT Registration Numbers
      label: possibly related
      why: Documents multiple VAT registration numbers setup for customers across regions, relevant to VAT number management on customer cards.
      by: model
    - to: https://learn.microsoft.com/dynamics365/business-central/finance-how-validate-vat-registration-number
      title: Validate VAT Registration Numbers
      label: possibly related
      why: Validates VAT registration numbers for customers using VIES service integration, directly addressing the VAT number error scenario.
      by: model
number: 13987
repo: microsoft/BCApps
source_id: bcapps-prs
url: https://github.com/microsoft/BCApps/pull/13987
kind: pr
base_branch: main
major: "30"
merged_at: "2026-11-17T22:50:16Z"
author: sanjmaurya
author_type: User
community_contribution: false
labels:
  - "Team: SCM"
change_class: code
change_kind: fix
behavior_change: true
breaking: false
files:
  count: 19
  additions: 524
  deletions: 35
  al: 15
apps:
  - Base Application
objects_touched:
  - key: table/36
    page: table/36
    type: table
    id: 36
    name: Sales Header
    app: Base Application
    status: modified
objects_unjoined:
  - path: src/Layers/CZ/BaseApp/Sales/Document/SalesHeader.Table.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/FI/BaseApp/Sales/Document/SalesHeader.Table.al
    status: modified
    reason: not-in-snapshot
  - path: src/Layers/GB/BaseApp/Sales/Document/SalesHeader.Table.al
    status: modified
    reason: not-in-snapshot
obsoletions: []
backports: []
fixes_issues: []
work_items:
  - 658933
systems:
  - sales
quote: the field now passes a copy of the customer (CustomerToValidate) with the number entered on the document set
joined_against:
  major: "30"
  commit: f53bb0f1ecd89fde9f133f9dcaf5bf43cf5f2671
---

# #13987 [Main][All-e]"Specify the VAT registration number that you want to verify" error when entering a VAT Registration No. in the Sales Order if the Customer Card has no VAT Registration No

> Fixed a VAT registration number validation error in Sales Orders where the system incorrectly validated the customer's stored VAT number instead of the number entered on the document when the customer card had no VAT number and the VIES validation service was enabled.

[Pull request](https://github.com/microsoft/BCApps/pull/13987) · merged into `main` (BC30) on 2026-11-17 by sanjmaurya · 19 files (+524 -35), 15 AL · fix · tier official · reviewed (checked by Opus)

## What changed

- Sales Header VAT Registration No. field now passes a copy of the customer record with the entered number instead of the actual customer record for VIES validation
- Preserves the existing behavior of only filling a blank customer VAT number, preventing unintended overwrites
- Added comprehensive test cases to verify the validation checks the entered number when the customer has no VAT number
- Fix applied across all localization layers (W1, NA, GB, FR, ES, IT, etc.)
- Resolves error 'Specify the VAT registration number that you want to verify' when entering valid VAT numbers on sales documents
- Behaviour changes for users or extensions.

## AL objects touched

- [Table 36 "Sales Header"](../../objects/table/36.md), Base Application: modified
- `src/Layers/CZ/BaseApp/Sales/Document/SalesHeader.Table.al`: modified, not in the BC30 snapshot
- `src/Layers/FI/BaseApp/Sales/Document/SalesHeader.Table.al`: modified, not in the BC30 snapshot
- `src/Layers/GB/BaseApp/Sales/Document/SalesHeader.Table.al`: modified, not in the BC30 snapshot

## Context

- Work items: AB#658933
- Labels: Team: SCM
- Systems: sales
- From the description: "the field now passes a copy of the customer (CustomerToValidate) with the number entered on the document set"

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Use Multiple Customer VAT Registration Numbers](https://learn.microsoft.com/dynamics365/business-central/finance-how-use-multiple-vat-registrations) — possibly related: Documents multiple VAT registration numbers setup for customers across regions, relevant to VAT number management on customer cards. (model-linked)
- [Validate VAT Registration Numbers](https://learn.microsoft.com/dynamics365/business-central/finance-how-validate-vat-registration-number) — possibly related: Validates VAT registration numbers for customers using VIES service integration, directly addressing the VAT number error scenario. (model-linked)

Source: metadata of a merged pull request in microsoft/BCApps (bcapps): title, labels, changed paths and counts, with a summary in our words. No source text and no description beyond one short quote (D10, D61).
