Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 04:55 AM
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 05:13 AM
try this:
(function runMailScript(current, template, email, email_action, event) {
var tpsa = new GlideRecord("kb_knowledge");
tpsa.addQuery("number", "KB0017341");
tpsa.query();
if(tpsa.next())
{
var instance = gs.getProperty('glide.servlet.uri');
var text = "kb_view.do?sys_kb_id="+tpsa.sys_id;
var newURL = '<a href="' + instance+text+ '"> click here </a>';
template.print(newURL);
}
})(current, template, email, email_action, event);
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure
Regards,Sushant Malsure
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 04:59 AM
can you describe more about your requirement?
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure
Regards,Sushant Malsure
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 05:07 AM
(function runMailScript(current, template, email, email_action, event) {
var tpsa = new GlideRecord("kb_knowledge");
tpsa.addQuery("number", "KB0017341");
tpsa.addQuery("sys_id","c07f3860879831d8dbbc63583cbb3557");
tpsa.query();
if(tpsa.next())
{
var instance = gs.getProperty('glide.servlet.uri');
var text = "kb_view.do?sys_kb_id=c07f3860879831d8dbbc63583cbb3557";
var newURL = '<a href="' + instance+text+ '"> click here </a>';
template.print(newURL);
}
})(current, template, email, email_action, event);
my requirement to replace sysid in tpsa.addQuery("sys_id","c07f3860879831d8dbbc63583cbb3557"); and
var text = "kb_view.do?sys_kb_id=c07f3860879831d8dbbc63583cbb3557";
to include this particular kb article in notification body. how to replace it any suggestions?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2023 05:13 AM
try this:
(function runMailScript(current, template, email, email_action, event) {
var tpsa = new GlideRecord("kb_knowledge");
tpsa.addQuery("number", "KB0017341");
tpsa.query();
if(tpsa.next())
{
var instance = gs.getProperty('glide.servlet.uri');
var text = "kb_view.do?sys_kb_id="+tpsa.sys_id;
var newURL = '<a href="' + instance+text+ '"> click here </a>';
template.print(newURL);
}
})(current, template, email, email_action, event);
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure
Regards,Sushant Malsure