Checklist Mandatory on Agent Workspace

Sailesh6
Tera Contributor

Hi All,

 

We have craeted a checklist from HR Service Configuration table. When a case is created, the HR agent can close the case without checking the checklist. Is there a way to make those checklist mandatory without customizing?

 

 

Thanks,

Sailesh

4 REPLIES 4

Dan O Connor
ServiceNow Employee
ServiceNow Employee

Hey your screenshots don't seem to be rendering there so not sure if we are talking about the checklist variable or if you have put your own checklist in place.

Below might assist if its the checklist formatter/variable 

 

https://community.servicenow.com/community?id=community_question&sys_id=375a0bacdbecef0ca39a0b55ca961972

Thanks for your responce. I have added those screenshots.

 

one is from HR service creation page and other is from Agent Workspace. I want to make those checklist mandatory in Agent Workspace. Meaning, no agent should be able to close the ticket without checking them all.

 

Thanks

Community Alums
Not applicable

Hi sailesh,

There is no way you can make the checklists Mandatory unfortunately !! 

You can read through these links for your knowledge : https://docs.servicenow.com/bundle/sandiego-employee-service-management/page/product/human-resources...

Mark my answer correct & Helpful, if Applicable.

Thanks,
Sandeep

Susan Britt
Mega Sage
Mega Sage

Hi Sailesh,

You can create a Script Included and Business Rule that runs Before Update when the State changes to Awaiting Acceptance or Closed Complete to validate if there are any open checklist items for this case.  

var validateChecklist = Class.create();
validateChecklist.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
	
	isChecked: function(id){
		var cklist = new GlideRecord("checklist");	
		cklist.addQuery("document", id);		
		cklist.query();		
		while (cklist.next()) {
			var gr_checkListItem = new GlideRecord("checklist_item");
			gr_checkListItem.addQuery("checklist", cklist.sys_id);
			gr_checkListItem.addQuery("complete", false);
			gr_checkListItem.query();
			if (gr_checkListItem.next())
				return false;
			else
				return true;
		}
		return true; //No checklist found for the record	
	},
	
    type: 'validateChecklist'
});

 

(function executeRule(current, previous /*null when async*/) {
	var res = new validateChecklist().isChecked(current.sys_id);
	if(res)
		return;
	else
		gs.addErrorMessage("Please complete each checklist item before closing this HR Case.");	
		current.setAbortAction(true);  //prevents the update from hitting the database (state change)

})(current, previous);