Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Need to Clear field on a Validation Business Rule

DeepThinker
Giga Contributor

The following BR message is checking to make sure the actual start date is not before the Planned start date on a change. then is throws a message. Can someone help with how I would clear the work_start field in addition to this message. 

I've tried "g_form.clearValue('work_start');" before the Abort but this did not work. I think I'm missing an if statement but I don't know how to write it. 

Here is the script:

(function executeRule(current, previous /*null when async*/) {
gs.addErrorMessage(gs.getMessage("{0} must be after {1}", [ current.work_start.getLabel(), current.start_date.getLabel() ]));

current.setAbortAction(true);


})(current, previous);

5 REPLIES 5

This worked beautifully if the user manually updated the Actual start but it failed to work when the "Implement" UI Action is clicked. Any ideas?