- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2022 06:38 AM
How to send mail to approver on ritm if any comment has been made in the ritm by the requestor
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2022 03:50 AM
Hello Shalika,
I am not sure what will be the best approach to implement this requirement in your instance but you can do the following:
1. Create an event in sysevent_register table with Name as sc_req_item.commented.approver and Table as sc_req_item.
2. Create an after update BR on sc_req_item table with condition and script as shown below:
Script Condition: current.comments.changes() && gs.getUserID() == current.requested_for
(function executeRule(current, previous /*null when async*/ ) {
var lastComments = current.comments.getJournalEntry(1);
var approverList = [];
var sysApprovalGR = new GlideRecord("sysapproval_approver");
sysApprovalGR.addEncodedQuery("sysapproval=" + current.getUniqueValue() + "^state=requested");
sysApprovalGR.query();
while (sysApprovalGR.next()) {
approverList.push(sysApprovalGR.getValue("approver"));
}
if (approverList.length && lastComments) {
gs.eventQueue("sc_req_item.commented.approver", current, approverList, lastComments);
}
})(current, previous);
3. Create a notification on sc_req_item table with below details:
Subject: ${number} has been commented by ${requested_for}
in Message field you can put the below content:
You can make changes as per your requirement in email content.
Please mark my respsone as helpful/correct, if it answer your question.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2022 07:30 AM
Hi Shalika,
Do you just want to send email to approver for the information or you want to get approval/rejection as well ?
Regards!
Uma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2022 01:00 AM
I just want to send email to approver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-02-2022 07:34 AM
Hi
Can you please elaborate more?
Content of the notification?
Only for specific catalog or for all catalogs?
Share the business usecase
Thanks,
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2022 01:01 AM
The content of the notification will be the comment that is made by the requested for in the ritm. I want this only for a particular catalog item