- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2019 12:15 AM
When a knowledge article is sent for approval, i am preparing a notification (event triggered and on knowledge table) to send to approver. That event parm1 has the approver sys id.
In the email message, i have the below line:
Click here to view Approval Request
When the user clicks here, approval record has to open. Can anyone help me in writing the email script for this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2019 12:29 AM
You should be able to get this in a mail script:
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('document_id', current.getUniqueValue());
gr.query();
if(gr.next()){
var link = '<a href="sysapproval_approver.do?sys_id=' + gr.getUniqueValue() + '">here</a>'
template.print('Click ' + link + ' to view the Approval record');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2019 12:29 AM
You should be able to get this in a mail script:
var gr = new GlideRecord('sysapproval_approver');
gr.addQuery('document_id', current.getUniqueValue());
gr.query();
if(gr.next()){
var link = '<a href="sysapproval_approver.do?sys_id=' + gr.getUniqueValue() + '">here</a>'
template.print('Click ' + link + ' to view the Approval record');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2022 10:11 PM
Hi i know that this is an old post, but i noticed that if you use a group as an approver this will insert a multiple records in sysapproval_approver table. Now, how can you get the specific record that has been approved/reject?
The code you have given is working perfectly, but it only gets the latest approval record, and not the record which being approved/reject.