Notifications
Announcements
No record found.
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.
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?
Thanks for the quick response.
Yes, there is some more new logic to be implemented instead of existing.
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.
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
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/.../
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
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 449 Super User 2025 Season 2
Martin Dráb 422 Most Valuable Professional
BillurSamdancioglu 239 Most Valuable Professional