How to make work notes mandatory in Major Incident workbench
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi,
For any Major Incident, when a user clicks the Resolve button from the Major Incident Workbench, both Work Notes and Additional Comments should be mandatory. The incident should not be allowed to move to the Resolved state unless these fields are populated.
How can we achieve this . Please suggest
Thanks in advance 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @mounika7675
Create a BEfore update BR.
Condition: when state changes to Resolve
Sample script /not tested:
(function executeRule(current, previous /*null when async*/) {
if (current.state == 6) //update state with correct state value
{
var isCommentsEmpty = current.comments.nil();
var isWorkNotesEmpty = current.work_notes.nil();
if (isCommentsEmpty || isWorkNotesEmpty) {
gs.addErrorMessage(gs.getMessage("Work Notes and Additional Comments must be populated before resolving a Major Incident."));
current.setAbortAction(true);
}
}
})(current, previous);
Refer this Artcle:
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti