- 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
‎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
‎02-10-2022 03:19 AM
Try this:
link = gs.getProperty("glide.servlet.uri") + portal_gr.getValue("url_suffix");
template.print('<a href="' + link + '"');
template.print(gs.getMessage('Click here for portal.'));
template.print('</a>');
then
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2022 03:25 AM
Thanks all 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-10-2022 08:27 AM
Can you also please let me know how to get to a request in portal ?
example , when i get this notification up on clicking the link it should redirect me to the record where the notification is generated from (in portal view)