How to make work notes mandatory in Major Incident workbench

mounika7675
Tera Contributor

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.

1000166267.jpg

How can we achieve this . Please suggest

 

Thanks in advance 🙂 

1 REPLY 1

Tanushree Maiti
Tera Patron

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:

Major Incident Management (MIM) - Edit the Resolve button modal popup window to account for custom f...

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti