- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2015
09:01 PM
- last edited on
09-16-2023
08:55 PM
by
ServiceNow
Hello all, Having a little issue with the UI Policy "Comments mandatory on rejection". It appears that comments are not mandatory for Change Request's.
I made the update from blog post
https://www.servicenow.com/community/developer-blog/setting-approval-comments-to-mandatory-in-eureka... |
This fixed the issue with Request Item tickets but not Change Request.
Overall, if the approval is for a Change Request the user is notified to enter comments if the State is Rejected but they can click save or update to bypass the mandatory field.
Any help is appreciated.
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2015 11:29 PM
Hi Travis,
That should work, I am not really sure why it is giving the odd behavior. However for a workaround you can write a Business rule to achieve this requirement.
Business rule:
When :Before
Insert: true , update : true
Filter condition: state is rejected
Condition field under advanced : current.comments.nil()
Script:
gs.addErrorMessage("Comments are required when rejecting an approval");
current.state = 'requested';
current.setAbortAction(true);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2015 11:29 PM
Hi Travis,
That should work, I am not really sure why it is giving the odd behavior. However for a workaround you can write a Business rule to achieve this requirement.
Business rule:
When :Before
Insert: true , update : true
Filter condition: state is rejected
Condition field under advanced : current.comments.nil()
Script:
gs.addErrorMessage("Comments are required when rejecting an approval");
current.state = 'requested';
current.setAbortAction(true);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2015 12:37 AM
Hi Travis,
check is there any other script written with the condition like current.sys_class_name == 'change_request'.