how to make field mandatory using script in UI policy

chichu
Kilo Contributor

how to make field mandatory using script in UI policy

8 REPLIES 8

Harneet Sital
Mega Sage
Mega Sage

g_form.setMandatory(<fieldname>, <value>);


e.g.   g_form.setMandatory('short_description', true);



Refer : Client Scripts - ServiceNow Wiki point 4.8.2


Thankyou Harneet Sital ...its working but but before script i will give condition also .....its working....


Manik
ServiceNow Employee
ServiceNow Employee

Hi Raja,



In UI Policy you can add a UI Policy Action where you can add the field you want to make as mandatory and set the flag for mandatory as true.




Creating a UI Policy - ServiceNow Wiki



Thanks,


Manik



PS - Please mark correct , helpful or like if it solves your problem.


chichu Please mark correct to the answer if you found the answer appropriate or relevant. Thanks