- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:12 AM
Hello Community,
Can any one help below requirement.
I want to display the number in notification body through email script and if i click that number it should be open form view same record and i dont want to open in service portal.
anyone help me with the script it's highly appreciated.
Thanks,
Ramesh kalava
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-18-2020 05:22 AM
Hi
In your script you can do simply like this
var attachLink = '<a href="/incident.do?sys_id='+current.sys_id+'">' + current.number + '</a>'; //put your table name
template.print(attachLink);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:20 AM
Means you want to open in the backend form table?
Is it right?
If that is the case, create your URL wherever you want to redirect
Thanks
Sudhanshu

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:22 AM
Hi,
You can use the following variable which will insert a link with the display value of the record (which is most likely the number)
${URI_REF}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:24 AM
Hi Kieran,
Exactly i am looking for this if i place this in body it will work and i want to achive same functionality through email script.Could you please help me with email script to achive this

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 04:32 AM
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var recordlink = current.getLink();
var prefix = gs.getProperty('glide.servlet.uri');
var url = prefix + recordlink;
var displayvalue = current.number;
template.print('<a href="' & url & '">' + displayvalue +"</a>")
})(current, template, email, email_action, event);