- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 03:14 AM
Hello , we have a requirement in a notification, we need to provide the link to portal ( this need to be done via mail script , as there are multiple notifications )
The notification is in scoped application , Mail script is also in scoped application , for some reason I am not able to see the link in the notification. what am i doing wrong here ?
code in Notification
${mail_script:redirect_user_to_portal}
Mail script code : where "eam" is the portal name , the notification is triggering but the mail script is not displaying, I validated the name too
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord
*/
event) {
// Add your code here
var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'eam' +'">Click here for portal.</a>';
})(current, template, email, email_action, event);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2022 03:18 AM
Hi,
Use this
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord
*/
event) {
// Add your code here
var url = '<a href="' + gs.getProperty('glide.servlet.uri') + 'eam' +'">Click here for portal.</a>';
template.print(url);
})(current, template, email, email_action, event);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2023 08:54 PM
Hi Anurag,
I have a requirement for a catalog item question variable which has 4 options (Multichoice).
Option 1 - Report A
Option 2 - Report B
Option 3 - Report C
Option 4 - Report D
So when any one of these options is selected and submitted, RITM gets generated and is sent for approval. Once Approved by the approval group, the notification should be triggered to the user which will have the access to that report via a link (Click here to access your report). So each option has different links. How do I write a mail script for this requirement? Do you have any sample code ? Because not sure if we can use variables in a mail script.
Thanks in advance!