- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
12-12-2023 04:13 AM
I need the hyperlink of KB article to be added in the notification that triggers from 'kb_feedback_task' table.
Solved! Go to Solution.
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
12-12-2023 04:43 AM
Hi @Admin7267
according to the page https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/administer/notification/concept/c_... you should be able to get the link when using
${feedback.article.URI_REF}
Maik
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
12-12-2023 08:01 AM
Are you using it in the kb_feedback_task notification?
You have to create an email script by System Notification > Email > Notification Email Scripts.
Email Script:
Then use this email script in the notification Message HTML field of kb_feedback_task table.
${mail_script:kb_article_link_from_kb_feedback_task}
KB Feedback Task Notification
After previewing the notification, we get,
In this way, it's working for me. Hope it helps and solves your problem. If it does solve your problem, kindly mark this as a solution so it may help others in the future.
Regards,
Hamza
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
12-12-2023 04:43 AM
Hi @Admin7267
according to the page https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/administer/notification/concept/c_... you should be able to get the link when using
${feedback.article.URI_REF}
Maik
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
12-12-2023 06:14 AM
Thanks for the help, but it's not working @Maik Skoddow 
Not sure why
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
12-12-2023 10:54 PM
Thank you so much @Maik Skoddow, It was working as expected.
I see when I preview the notification Feedback task is selected that don't have article number for reference
- Mark as New
 - Bookmark
 - Subscribe
 - Mute
 - Subscribe to RSS Feed
 - Permalink
 - Report Inappropriate Content
 
12-12-2023 04:52 AM
Hey @Admin7267,
You can copy the link by going to that article in the portal
You can paste the link in your mail script as this:
template.print('<a href="<INSTANCE_BASE_URL>/sp/en/what-are-phishing-scams-and-how-can-i-avoid-them?id=kb_article&sysparm_article=KB0000028">Article</a>');
If you want the link to the KB article on the platform:
template.print("<a href='"+gs.getProperty('glide.servlet.uri')+ "kb_knowledge.do?sys_id="+current.feedback.article + "'>"+current.feedback.article.getDisplayValue()+"</a><br/>");
If you want the link to the Article on the portal then:
var shrt_desc = current.feedback.article.short_description;
	var url_desc = shrt_desc.replaceAll(" ","-");
	// removing special character from the end
	url_desc = url_desc.replace("?","");
	url_desc = url_desc.replace("!","");
	url_desc = url_desc.replace(".","");
	template.print("<a href='"+gs.getProperty('glide.servlet.uri')+ "sp/en/"+url_desc+"?id=kb_article&sysparm_article="+current.feedback.article.number + "'>"+current.feedback.article.getDisplayValue()+"</a><br/>");
Then, you can use a mail script in your notification,
${mail_script:<EMAIL_SCRIPT_NAME>}
Kindly appreciate the efforts of community contributors by marking appropriate response as the correct solution and helpful, this may help other community users to follow the right solution in the future.
Thanks,
Hamza
