It has been a while since I had to do JavaScript in screens. And even longer since I done a validation on the screen. Since then there were changes in HR.Net which I have missed. And my old way to validate screens no longer works. But the fix is simple enough – all you need to do is add a parameter to the old script:
var orig_ValidatorOnSubmit = window.ValidatorOnSubmit; window.ValidatorOnSubmit = function(validationGroup){ var ErrMsg =''; var validate = true; // your custom validation goes here if (!validate){ alert(ErrMsg); return false } return orig_ValidatorOnSubmit(validationGroup); }
Pingback: Java Script Validation in Workflow | Vizual HR.Net Development: Tips, Tricks and Work-Arounds