Skip to content
Fixing VAT Registration No. validation in older NAV versions

Fix Online Validation of VAT Registration Nos for older Versions

Daniel Gorski
Daniel Gorski August 17, 2022
2 min read

Did you know that Business Central and older Dynamics NAV Versions are able to validate the VAT Registration No. of your Customers, Vendors or Contacts?

Get more details for Business Central here:

https://learn.microsoft.com/en-us/dynamics365/business-central/finance-how-validate-vat-registration-number

Or for our german friends:

https://learn.microsoft.com/de-de/dynamics365/business-central/finance-how-validate-vat-registration-number

But anyway: It is your responsibility to check that the data is valid. Business Central or Dynamics NAV are using the VIES VAT Number Validation service by default:

Web Service: https://ec.europa.eu/taxation_customs/vies/services/checkVatTestService

Get more details about that service on the website of the European Commission:

https://ec.europa.eu/taxation_customs/vies/#/vat-validation

But customers and partners are getting an error since two days when they use the service in older Dynamics NAV Versions/Builds:

We've created a hotfix for Business Central SaaS and OnPrem here:

https://github.com/byndit/BeyondAL/blob/main/BeyondAL/src/Hotfixes/VatRegNoValidationFix.Codeunit.al

Fix overview diagram

You should upgrad to the latest build ;-) but anyway here is how to fix it:

SendRequestToVatRegistrationService patch

🔧 How to Fix It (Manually)

Codeunit 248 – SendRequestToVatRegistrationService

// +++HOTFIX
SOAPWebServiceRequestMgt.SetContentType('text/xml; charset=utf-8');
// ---HOTFIX

BuildWebRequest fix example


Codeunit 1290 – BuildWebRequest

In newer builds, the GlobalContentType is used.

// +++HOTFIX
IF GlobalContentType = '' THEN
    GlobalContentType := ContentTypeTxt;
HttpWebRequest.ContentType := GlobalContentType;
// HttpWebRequest.ContentType := ContentTypeTxt;
// ---HOTFIX

Hotfix complete


🎉 That’s it!

We still recommend: Upgrade to Business Central SaaS to avoid such issues in the future.

Feel free to contact us for more help, best practices or to discuss upgrade paths.

Related posts

▸ All posts
DeepWiki search for Business Central Intrastat

DeepWiki for BC Localization: German Intrastat

July 09, 2025 · Daniel Gorski

Discover how DeepWiki simplifies the search for complex localization implementations in Business Central, like German Intrastat.

Read More
Read More: DeepWiki & Intrastat: Effortlessly Navigate BC Localization Details
Converting Unix timestamps in AL

Unix Timestamp to DateTime in AL

October 09, 2023 · Daniel Gorski

Convert a Unix timestamp to a DateTime in Business Central AL with the Type Helper codeunit, and back with the difference to 1 January 1970 in seconds.

Read More
Read More: From Epoch to Now: Deciphering the Magic Behind Unix Timestamps in AL
Extend barcodes with a few lines

Extend Beyondbarcodes with a few lines of code

October 04, 2023 · Daniel Gorski

This is our public repository where the source code is located:

Read More
Read More: Extend Beyondbarcodes with a few lines of code