- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 10:29 PM
how to make the rejected comments visible to the requester in service portal as well as work notes?
Solved! Go to Solution.
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2022 01:58 AM
update line 8 as this
gr.comments = current.comments.getJournalEntry(1);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 10:39 PM
Hi,
can you share screenshot?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 10:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 10:56 PM
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 11:06 PM
Hi
What you can do here is when an Approver reject a Approver copy that Rejection comments to Work Notes of Requested Item record.
This can be done using a After Update Business Rule on Approval Table as per details mentioned below:
BR Details:
table: Approval (sysapproval_approver)
When: After Update
Condition: Approval For --> Task Type is Requested Item AND State Changes to Rejected
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id',current.sysapproval);
gr.query();
if(gr.next()){
gr.comments = current.getJournalEntry(1);
gr.update();
}
})(current, previous);
My suggestion here will be to update Additional Comment fields as Work notes is a field which is ideally used for internal communication between the fulfillers and are not meant to be shown to the Requestor who has created the ticket.
Additional comment fields are by default visible on the portal so that will solve your requirement as well.
Let me know if you have a follow up query.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke