Skip to content

Commit 73f3ec2

Browse files
authored
Create script.js
1 parent 8bae41c commit 73f3ec2

File tree

1 file changed

+14
-0
lines changed
  • Specialized Areas/Notifications/Email Notification for KB Article Author with KB link

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// This script assumes it is used in a notification triggered by the kb_knowledge table.
2+
//use this line to get KB Number ${mail_script:get_kbarticle_link}
3+
//NOTE THE NAME OF THIS SCRIPT IS "get_kbarticle_link"IN EMAIL SCRIPTS TABLE _ "sys_script_email"
4+
5+
6+
(function executeEmailScript(current, template) {
7+
// Construct the URL to the KB article
8+
9+
var instanceURL = gs.getProperty('glide.servlet.uri'); // Get the instance URL
10+
var kbLink = instanceURL + "kb_view.do?sysparm_article=" + current.number; // Adjust based on your URL structure
11+
12+
// Output the link in HTML format
13+
template.print('<a href="' + kbLink + '" target="_blank">' + current.number + '</a>');
14+
})(current, template);

0 commit comments

Comments
 (0)