How to make work notes mandatory in Major Incident workbench
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks 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
3 weeks ago
Hi @Mk_snow
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks for your support
This doesn't seems to be working. Even though I put some comments and worknotes it's still showing the error message only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Mk_snow
Did you change the state to resolve?
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
@Tanushree Maiti When I click on resolve, even though I put comments and work notes it's still showing as error message screenshot attached