- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2017 09:18 AM
Dear Colleagues,
I'm preparing some notifications and what I wan to include in them is link to approval view for approvers, so they can easily reach the ticket and approve/reject from there.
I've tried ${sysapproval.URI_REF} however it is not working, nothing gets printed to the notification.
I've tried to build a script which will create a link for me:
function CreateLinkForObject(strTableName, strSysID){
return "<a href=" + gs.getProperty('glide.servlet.uri') + gs.generateURL(strTableName, strSysID) + ">Click here to view the ticket</a>";
}
var gr = new GlideRecord("sysapproval_approver");
gr.addQuery("sysapproval", current.sys_id);
gr.query();
if(gr.next()) {
template.print(CreateLinkForObject("sysapproval_approver", gr.sys_id.toString()));
}
Script is working however the problem is that when I have more than one approver the script cannot distinguish the person.
Are there any ways to tell to whom specifically certain email was sent ? OR maybe there is some way to enable ${sysapproval.URI_REF} ?
I would greatly appreciate any fedback.
Thank you.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-29-2017 05:41 AM
HI,
Thank you for the clarification of the use case. I ran in to this as a customer many many years ago. Last year I came up with this solution using a scheduled job. I added some 'scriptless' capabilities to make it easy to configure since it is avery common use case.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2017 09:30 AM
A couple questions...
What table is the notification being generated from? Is it Approver (sysapproval_approver)?
Specifically, what do you want to link to when they click the link? The approval record itself or the "thing" you are approving?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2017 09:38 AM
Hi Chuck,
Thank you for fast reply.
It's working on "sysapproval_approver" table. I want to show the approval record for specific approver, so he/she can approve easily.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2017 09:51 AM
In that case, you would just use ${URI} or ${URI_REF} in the message text to link to the approval record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-28-2017 10:17 AM
When I'm using this I'm still getting redirected to the RITM itself.