how to make field mandatory using script in UI policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2016 10:37 PM
how to make field mandatory using script in UI policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2016 10:45 PM
g_form.setMandatory(<fieldname>, <value>);
e.g. g_form.setMandatory('short_description', true);
Refer : Client Scripts - ServiceNow Wiki point 4.8.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-14-2016 11:57 PM
Thankyou Harneet Sital ...its working but but before script i will give condition also .....its working....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 12:01 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 12:40 AM
chichu Please mark correct to the answer if you found the answer appropriate or relevant. Thanks