UI policy error Unable to set security read-only field's mandatory state to true

Sheryl Lyke2
Tera Guru

I'm experiencing some strange UI policy behavior on change request. As an admin user, I'm not having the issue but an itil user is. 

Process: create a new change request and use UI actions to update the state of the change.

The field I'm looking at is close_notes. The user has access to it while the change is New, Scheduled, Planning, In Progress. But when the UI action "Change Complete" is pushed to update the state to change complete, the close_notes field is read only. The debugger just shows "Unable to set security read-only field's mandatory state to true". But the UI policy should be making the field mandatory at this point not read only. I know it's not an ACL issue because they have access to the field until the state changes to change complete. There aren't any other UI policies on the field that would be colliding with it. 

State = planning, field is editable. Same for In Progress and New

find_real_file.png

 

State is in progress - error in debugger

find_real_file.png

 

Here's the UI action that sets the state to change complete

 

find_real_file.png

 

And here's the UI policy that sets the field to mandatory

find_real_file.png

 

Does anyone know what would be causing this?

1 ACCEPTED SOLUTION

It was the business rule "mark task closed" that was causing the record to become inactive

View solution in original post

9 REPLIES 9

sachin_namjoshi
Kilo Patron
Kilo Patron

There must be another conflicting UI Policy with a condition setting them to mandatory with "Reverse if False" checked. That's gotten me a few times.

 

Regards,

sachin

Wouldn't that UI policy also show in the debugger? Also, wouldn't it show up for me as an admin user too?

You need to add field watcher for debugging UI policies.

Please check below for UI policies debugging.

 

https://developer.servicenow.com/dev.do#!/learn/learning-plans/orlando/new_to_servicenow/app_store_l...

 

Regards,

Sachin

Adding those logs - not seeing anything changing the field to read only
find_real_file.png

find_real_file.png