VIES validation for customer records.

Overview

When you create or edit a customer in NetSuite, the VAT number can now be validated automatically.

The script checks the number against:
– VIES (EU’s official VAT database)
– CVR (for Danish companies only)

This ensures VAT numbers are valid and belong to the correct company.
For Danish entities, you can also fetch the VAT number directly using a lookup button.

What this means for you:

  • You no longer need to manually check if a VAT number is valid.
  • The system will warn you if the number is missing, invalid, or doesn’t match the company name.
  • For Danish companies, you can click the 🔍 icon to fetch the VAT number automatically.
  • The record cannot be saved with an invalid VAT number unless you explicitly confirm.

Key features:

  • Automatic VAT validation when you enter or edit a VAT number
  • Error messages shown directly in the form (no disruptive pop-ups)
  • Automatic saving of validation status and last checked date
  • Company name cross-check with VIES
  • Special CVR lookup button for Danish companies

Fields you can see:

How it behaves:

On form load

  • Hides NetSuite’s built-in (and broken) VIES link field
  • If the customer is Danish, a 🔍 lookup button appears next to the VAT field
  • If a VAT number is already filled in but not validated, it will be checked automatically
  •  

When you change VAT

  • The system first normalizes the VAT (adds the country prefix if missing, trims invalid characters)
  • If the format looks wrong → ❌ error message appears
  • If the format is correct → the system calls VIES:
    • Invalid → red error toast, VAT marked as invalid
    • ⚠️ Name mismatch → yellow warning with choice: confirm anyway or clear the field
    • Valid & matching → green success toast, VAT marked as validated

When you save the record

  • If the VAT number is invalid or unvalidated, a confirmation prompt appears
  • If you decline, the record will not save until the VAT issue is resolved
  • If you accept, the VAT will be cleared, and the record will be saved without it

Example of workflow:

  1. Open a customer record
  2. Enter VAT number 5566778899 for a Danish company
    • The system automatically changes it to DK5566778899
  3. If the number is valid, you’ll see a ✅ green toast: Valid VAT number!
  4. If VIES says it belongs to a company whose legal name doesn’t match the company name in NetSuite, you’ll be asked whether to confirm anyway or clear the field
  5. On save, the record will only proceed if the VAT number has been validated, if not you’ll get a dialog box that tells you that the field will be cleared if you chose to proceed saving the record

Result: You can be sure VAT numbers are correct before using them on invoices and reports.

Yay! Let's make it happen.

A demo can be done in any way you wish. But it's easier to plan, if we know a bit more about your situation.

omnit employees
Yay! Let's make it happen.

A free health-check is for everyone. Let's find out what you need, and how - and if, we can help!

omnit employees
Sorry to disturb you. Can we offer a free demo or consultation?

It's non-binding and for your convenience. We just want the best match for your company.