We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Additional comments mandatory when Incident state changes from New to In Progress

mgraden
Tera Contributor

I'm trying to create an onChange client script that makes the additional comments of an Incident mandatory when the state changes from New to In Progress. For some reason it doesn't work, but if I change it to 'work_notes' instead of 'comments', then it works. Could something be causing a conflict? 

 

Also, we have an onLoad client script that switches the state from New to In Progress and make comments mandatory if the assigned to is the current user (second screenshot). This one works. Why is setting comments mandatory working in the onLoad but not in the onChange script? 

2 REPLIES 2

Tanushree Maiti
Giga Sage

Hi mgraden,

Could you please try it by a UI policy.

 

This could be because there is an OOTB UI Policy which makes the additional comments field mandatory when the State is on-hold and the on-hold reason is "Awaiting Caller" and the reverse if false checkbox enabled in the OOTB UI policy is contradicting with your UI Policy.

 

Just change the order of the UI Policy you have created to some order which is greater than the order mentioned in the OOTB UI Policy. 

 

Hope it will work for you.

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Ankur Bawiskar
Tera Patron

@mgraden 

any other UI policy is conflicting?

what debugging did you do?

did you add alert in your client script?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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