- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 05:03 AM
Hi All,
Requirement : A notification needs to be triggered when ever a automation case gets created, this table is a custom table which extends the task table and it should be below format.
Dear Requestor,
Your Case has been opened: <Automation number>.
Your list of Automation Cases is accessible here <link>.
---This is automated alert mail from automated mailbox, please do not answer ---
Best Regards
Automations.
Here in the notification, I have to provide a link which have the list of Automation cases raised for that particular user (requested for should be that user). I'm not sure how to achieve this. Can anyone please guide me on this.
Thanks in Advance,
Nagashree.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 06:51 AM
Hello @Nagashree5
To make a clickable hyperlink via a notification script, refer to the example below:
sample notification script:
(function runMailScript(current, template, email, email_action, event) { // Build the link format var attachLink = '<a href=/sp?id=ticket&sys_id=' + current.sys_id; attachLink += '&table=' + current.getRecordClassName(); attachLink += '>Portal</a>'; // Print the link text template.print(attachLink); })(current, template, email, email_action, event);
And yes. Triggering the email when the event is fired is the best approach in such scenarios.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 10:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 11:34 PM
Hi @SatyakiBose ,
Thanks for the response, I have created the email script and called that in Notification. The hyper link is working but it is taking to the case that is been created, But here, the hyperlink should be the list of cases where the user is requested for. Suppose I have 5 cases requested for on my name, then the list 5 cases needs to be visible through the hyper link.
I'm not sure how to achieve this. Could you please guide me.
Thanks in Advance,
Nagashree.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2023 10:47 AM
A sample notification script to render a list of record is as:
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var sid = SYS_ID_OF_A_GROUP;
var url = gs.getProperty('glide.servlet.uri') + 'incident_list.do?sysparm_query=active=true^assignment_group=' + sid;
template.print(url + "<br />");
})(current, template, email, email_action, event);
Make sure to add the href parameters to make this a clickable link.