Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How do I stop a form from being submitted in a Client Script?

kishorchika
Tera Contributor

How do I stop a form from being submitted in a Client Script?

5 REPLIES 5

Viraj Hudlikar
Tera Sage
Tera Sage

Hello @kishorchika 

For Client Scripts you will use return false;
For business rules, you can use current.setAbortAction(true); only when you have complex conditions to be verified if easy condition without a script, it can be done by adding conditions to the 'when to run' section of the BR.

In the 'Action' tab, add a message by clicking on 'Add a message' checkbox, click on checkbox ' abort action' and save the BR.

 

If my response has helped you, hit the helpful button, and if your concern is solved, do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.