File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Specialized Areas/Notifications/Add KB Article Link Dynamic Email Script to Notification Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1+ //Add KB Article Link Dynamic Email Script to Notification
2+ // This script assumes it is used in a notification triggered by the kb_knowledge table.
3+ //use this line to get KB Number ${mail_script:get_kbarticle_link}
4+ //NOTE THE NAME OF THIS SCRIPT IS "get_kbarticle_link"IN EMAIL SCRIPTS TABLE _ "sys_script_email"
5+
6+
7+ ( function executeEmailScript ( current , template ) {
8+ // Construct the URL to the KB article
9+
10+ var instanceURL = gs . getProperty ( 'glide.servlet.uri' ) ; // Get the instance URL
11+ var kbLink = instanceURL + "kb_view.do?sysparm_article=" + current . number ; // Adjust based on your URL structure
12+
13+ // Output the link in HTML format
14+ template . print ( '<a href="' + kbLink + '" target="_blank">' + current . number + '</a>' ) ;
15+ } ) ( current , template ) ;
You can’t perform that action at this time.
0 commit comments