Making 'Assigned to' mandatory on resolution

KLynch
Kilo Contributor

Hello

I'm a newbie here, implemented Service-now today and this is my first post.

I've had a quick scan of the forum and I've seen some topics that have touched on this - but not being a Java whiz I've not been sure how to tweak the script.

What I want to do is make the 'Assigned to' field mandatory on resolution or closure. At present it's not a mandatory field as we want to assign to groups, but when the Incident is resolved, we need to see who dealt with it.

At present it's possible to resolve an incident whilst leaving the 'Assigned to' field blank.

Any advice appreciated.

Regards

Karen

7 REPLIES 7

Mark Stanger
Giga Sage

You can use UI policy for this. No javascript wizardry necessary!

http://wiki.service-now.com/index.php?title=Creating_a_UI_Policy


KLynch
Kilo Contributor

Worked like a dream - thank you very much!

Karen


Not applicable

Keep in mind the gotchas such as UI Actions that allow users to close a Task from a Related List. Example, in our Service Catalog, a Request Item related list will out of the box show the associated Tasks. A user and right click (this is a UI Action) and select Close Task. A UI Policy or client script will not be enforced under these conditions.

Please correct me if I am wrong,

Scott


benn23
ServiceNow Employee
ServiceNow Employee

You're right, but you can drop some additional code into that 'Close Task' UI Action to 'abort' the update if certain criteria are not met:

//if closed notes aren't entered, stop it!

if (!current.close_notes.nil()) {
current.state = 3;
current.update();
} else {
gs.addErrorMessage("Please update the close notes field prior to closing the task.");
action.setRedirectURL(current);
}