We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

How to make work notes mandatory in Major Incident workbench

Mk_snow
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 🙂 

4 REPLIES 4

Tanushree Maiti
Tera Patron

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:

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

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

Hi @Mk_snow 

Did you change the state to resolve?

 

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

@Tanushree Maiti  When I click on resolve, even though I put comments and work notes it's still showing as error message screenshot attached

1000166403.jpg

1000166404.jpg