Adding a Mandatory Close Notes to SCTASK

Brian Sorensen
Giga Guru

I just want to make sure this makes sense..

We have 1 Tier 2 who refuses to leave notes... super fun.  So when my Tier 1 team goes to check on a Catalog task and we see its been completed by this admin, we have no idea if he actually did what was asked.

I want to make it mandatory that when you press the CLOSE TASK button, you have to add notes

My thought is the following

1. Add the Close Notes field to the Form Design - this I can do
2. How do I make it Mandatory for them to fill it in when Close Task is clicked?

If I am not mistaken I do this
1. Configure UI Policy
2. Add new Policy - Condition State = Closed Complete - Close_notes Mandatory = True

Seems to work in Dev

Is there an easier way?

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@Brian Sorensen 

Using new UI policy on sc_task table to set Work Notes as Mandatory during State Changes to Closed Complete is the easiest way.

This would avoid touching the OOB "Close Task" UI Action

I would recommend using UI Policy based approach

1) Ensure for your UI Policy On Load checkbox is False

2) Also ensure if you wish to make this run only for some catalog items then add UI Policy condition as

Request Item.Cat Item [IS] Your Item Name

If you wish to use Script on the OOB UI Action then refer comments from Aman

Demo here:

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Brian Sorensen 

Using new UI policy on sc_task table to set Work Notes as Mandatory during State Changes to Closed Complete is the easiest way.

This would avoid touching the OOB "Close Task" UI Action

I would recommend using UI Policy based approach

1) Ensure for your UI Policy On Load checkbox is False

2) Also ensure if you wish to make this run only for some catalog items then add UI Policy condition as

Request Item.Cat Item [IS] Your Item Name

If you wish to use Script on the OOB UI Action then refer comments from Aman

Demo here:

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Brian Sorensen
Giga Guru

thank you @Ankur Bawiskar  and @Aman Singh 

Both solutions work, I am going to use the UI policy one that Ankur posted and test in our Dev for a few cases, then move over to production.