- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Users who use the Employee Center to monitor the requests they have submitted (usually via a catalog item) can view the REQ and the RITM, however, when a rejection reason is given by the approver in the SOW or UI16 view , the users cannot see it. When approvers approve in the Employee Center, the comments are viewable by the requestor. If users have itil access they can navigate to the RITM and see the rejection reason in the Additional Comments. What are we missing?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @DavidaFS1
To make the rejection reason visible on the Employee Center, follow these steps:
Configure a Business Rule that copies the comment when an approval is rejected.
- Create a Business Rule:
- Name: Copy Rejection Reason to RITM
- Table: Approval [sysapproval_approver]
- When: After
- Update: Check the box
- Condition: State changes to Rejected AND Approval for starts with RITM
(function executeRule(current, previous /*null when async*/) {
if (current.sysapproval.sys_class_name == 'sc_req_item') {
var ritm = new GlideRecord('sc_req_item');
if (ritm.get(current.sysapproval)) {
ritm.comments = current.comments.getJournalEntry(1);
ritm.update();
}
}
})(current, previous);
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi @DavidaFS1
To make the rejection reason visible on the Employee Center, follow these steps:
Configure a Business Rule that copies the comment when an approval is rejected.
- Create a Business Rule:
- Name: Copy Rejection Reason to RITM
- Table: Approval [sysapproval_approver]
- When: After
- Update: Check the box
- Condition: State changes to Rejected AND Approval for starts with RITM
(function executeRule(current, previous /*null when async*/) {
if (current.sysapproval.sys_class_name == 'sc_req_item') {
var ritm = new GlideRecord('sc_req_item');
if (ritm.get(current.sysapproval)) {
ritm.comments = current.comments.getJournalEntry(1);
ritm.update();
}
}
})(current, previous);
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti