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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to Skip/Bypass standard validation in contract class

(0) ShareShare
ReportReport
Posted on by 122

How to Skip/Bypass standard validation in contract class.

Example: I have HcmBirthdayContract class
I have to Skip/Bypass the validate method logic and write own custom logic.

Thanks in advance.

I have the same question (0)
  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi SarathVarma,

    Do you really need to bypass standard validation logic in this class? It just compares provided dates and nothing more. Or do you want to change default dates is there are empty?

  • SarathVarma Profile Picture
    122 on at

    Thanks for the quick response.

    Yes, there is some more new logic to be implemented instead of existing.

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi SarathVarma,

    I suggest you create CoC method and put your new logic before next call. There is no point to skip standard validation (date comparison), and if you need to put another default values to the dates it will work if you just do it before standard code executes.

  • SarathVarma Profile Picture
    122 on at

    Actually I have the similar requirement where I have to skip the standard validation which throws error by using checkFaikled()in validate method of report contract class

  • Verified answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi SarathVarma,

    In this case, you can still use CoC and add your logic after "next" statement and return true or false based on your logic. But be very careful with this approach, as bypassing standard validation can cause data corruption or/and unpredictable behavior. However, for reports, it should be quite safe. Also, you can clean infolog to avoid showing to user misleading error from standard validation.

    omni365.wordpress.com/.../

  • Verified answer
    qianwang Profile Picture
    7,168 on at

    Hi SarathVarma,

    You could use COC method to bypass the validate method like this :

    {

       boolean ret = next validate();

    ret = true;

    //your logic…… return ret1.

       return ret&&ret1;

    }

    Hope this helps.

    Regards,

    QianQW

  • Suggested answer
    SarathVarma Profile Picture
    122 on at

    Thanks Sergei Minozhenko And QianQW,

    Your approaches are worked for me, Thanks a lot.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans