- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 04:35 AM
Closure Code:
- If the request was rejected, the closure code must be set to "Request Rejected".
- on the resolution notes, it should show as "user name" on "system" has been rejected by "name" of the person who rejected the request
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 08:09 AM
Hi @siva krishna ch ,
Can you explain how the request is rejected. If anyone rejects in the approval table the request gets closed?Also if its in approval table where is the approval getting triggered. In RITM or REQ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 08:09 AM
Hi @siva krishna ch ,
Can you explain how the request is rejected. If anyone rejects in the approval table the request gets closed?Also if its in approval table where is the approval getting triggered. In RITM or REQ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 08:52 AM
Hi @Ramz
If the RITM is rejected from approvers, the closure code must be set to "Request Rejected".
- on the resolution notes, it should show as "user name" on "system" has been rejected by "name" of the person who rejected the request
- Please find the attached screenshot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 10:23 PM
Hi @siva krishna ch ,
So you write a after update business rule in Approver table
when to run:
State changes to Rejected
Script:
(function executeRule(current, previous /*null when async*/ ) {
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', current.sysapproval);
gr.query();
if (gr.next()) {
gr.closure_code = 'Request Rejected'; //CHange to your instance field and backend values
gr.resolution_notes = '"user name" on "system" has been rejected by' + current.approver.getDisplayName();
gr.update();
}
//Not sure what is user name you are referring to ,if it is any field in form just query them and diplay them
})(current, previous);
If you need this BR to run for Particular sc_req_item then you can mention them in conditions/script
Please mark my answer correct/helpful if it resolved your query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 08:57 AM