web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

how to write custom code on customer vat number field to validate the input data. in d365

(0) ShareShare
ReportReport
Posted on by 123
how to write custom code on customer vat number field to validate the input data.  in d365
  • Suggested answer
    Layan Jwei Profile Picture
    8,428 Super User 2026 Season 2 on at
    Hi M_R,
     
    If I understood you correctly, you want to add some validation when someone tries to fill the customer VAT number. 
    Example, let's say you want to validate that when people fill this field, it needs to be not less than 5 characters. If that's the case, you can add code in the validateField method. 

    You can look at standard tables and check how validateField method is used.
     
    If you need more help, then please give us more details.
     
    Best Regards,
    Layan Jweihan
  • Suggested answer
    Hana Xue Profile Picture
    Microsoft Employee on at
    Hi,
    As a supplement:
    You can check the link below to learn how to validate your VAT number.
    https://dynamicsax-fico.com/2019/05/05/validate-vat-numbers/
    For field validation, you can check the link below:
    https://www.atnyla.com/qanswer/table-method-validatefield-in-d365/202/909
    Validations, default values, and unmapped fields - Finance & Operations | Dynamics 365 | Microsoft Learn

    Hope these will be helpful!
    Best Regards,
    Hana
  • André Arnaud de Calavon Profile Picture
    308,274 Super User 2026 Season 2 on at
    Hi M R,
     
    For some countries, there is already a validation that can be enabled in settings. Can you tell for which country or countries you want to validate the VAT number?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 266 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 217

#3
Subra Profile Picture

Subra 164 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans