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 :
Small and medium business | Business Central, N...
Answered

Skip OnValidate logic on standard field without OnBeforeValidate event and IsHandled variable

(0) ShareShare
ReportReport
Posted on by 25

Hi all,

What is the best approach to skip/unable standard code in OnValidate field. ?

In my case "VAT Registration No." on TAB36 - OoValidate code overwrite "VAT Registration No." on Customer record, this is not acceptable for our client.

I have the same question (0)
  • Suggested answer
    Guillem Padilla Profile Picture
    427 on at

    Hi Kris,

    May I ask why you don't want to use the IsHandled approach?

    There is no other way to change this behavior, in fact it was added exactly for what you ask.

    In case that OnValidate trigger doesn't contain the IsHandled variable, you can always open an issue on Github asking for it here, like this one github.com/.../1237

  • KrisTW Profile Picture
    25 on at

    OnValidate trigger doesn't contain the IsHandled  - that why

    It's hot issue and we use BC15 onperm I can't wait for MS :)

    but I found other solution , in OnBeforeValidate I assign

      xRec."VAT Registration No." := Rec."VAT Registration No.";

    and in standard validation this line of code  

    if "VAT Registration No." = Customer."VAT Registration No." then

      exit;

    let me skip the validation

  • Suggested answer
    Guillem Padilla Profile Picture
    427 on at

    Hi,

    I am glad to know that you have found a solution modifying the xRec although it is not the most optimal, in the most recent versions the OnValidate trigger of the "VAT Registration No." field does contain the IsHandled approach.

    If the next time you specify beforehand the version of BC that you use, surely there are many more people who can help you faster.

  • Verified answer
    KrisTW Profile Picture
    25 on at

    You are right 

    pastedimage1612883206314v1.png

    Thank's for help

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,005 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,148 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 557 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans