Set close notes and close codes as mandatory while closing/resolving the incident in client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 11:22 PM
Set close notes and close codes as mandatory while closing/resolving the incident in client script
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 11:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2022 01:34 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2022 11:29 PM
Hi
Close codes and close notes are set as mandatory in closed and resolved state by default in OOB instances.
other ways are either you can create an UI policy with condition State is Resolved and add UI Policy Actions that make Close codes and Close Notes Mandatory.
Or you can also write an OnChange client script on the state field :
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(state == '6')
{
g_form.setMandatory('close_code',true);
g_form.setMandatory('close_notes',true);
}
else
{
g_form.setMandatory('close_code',false);
g_form.setMandatory('close_notes',false);
}
}
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2022 12:14 AM
Since there is already OOB Data policy which works as UI policy on form as well; so there won't be any need to create client script.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader