
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2018 08:01 AM
Hello, we have an approval notification that gets sent out when a KB article is set to published state by the submitting user.
The KB managers have to approve the article before it gets published, else it will revert back to draft.
In the notification, I am unable to call the fields from the KB table such as Short Description, Author, etc.
Notification:
When I try to add ${author} or ${short_description} the notification leaves those values blank as it cannot pull them from the [kb_knowledge] table, as the notification is generated from the [sysapproval_approver] table:
How do I get the notification to show these fields from the KB article?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2018 09:01 AM
Well this doesn't bode well:
https://community.servicenow.com/community?id=community_question&sys_id=28a84f21db5cdbc01dcaf3231f961994
Looks like you may need to go the mail_script route.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2018 09:01 AM
Well this doesn't bode well:
https://community.servicenow.com/community?id=community_question&sys_id=28a84f21db5cdbc01dcaf3231f961994
Looks like you may need to go the mail_script route.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2018 07:15 AM
https://community.servicenow.com/community?id=community_question&sys_id=28a84f21db5cdbc01dcaf3231f961994
This community post that you linked was what solved the issue for me.
It required a business rule, two email templates, and a custom notification, all of which were provided in the above community post.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2018 10:03 AM
After some extensive searching, here's what I found that you can work from:
http://www.servicenowelite.com/blog/2015/10/28/weekly-digest
and the piece that applies:
//Send list of Flagged Knowledge Articles
var myUser = gs.getUser().getUserByID(current.sys_id.toString());
var grKB = new GlideRecord('kb_knowledge');
grKB.addQuery('flagged','true');
grKB.addQuery('u_kb_ownership_group',myUser.getMyGroups());
grKB.query();
template.print('<a href="https://' + gs.getProperty('instance_name') + '.service-now.com/kb_knowledge_list.do?sysparm_query=flagged%3Dtrue%5Eu_kb_ownership_group%3Djavascript%3AgetMyGroups()">'+ "<strong>Your Flagged Knowledge Articles</strong></a>"+"\n"+"\n");
template.print("You have <strong>"+grKB.getRowCount()+"</strong> articles flagged in ServiceNow."+"\n");
template.print("<ul>");
while (grKB.next()) {
template.print("<li>");
template.print('Knowledge Article: <a href="https://' + gs.getProperty('instance_name') + '.service-now.com/kb_knowledge.do?sys_id='+grKB.sys_id+'">'+ grKB.number +"</a> - "+grKB.short_description);
template.print("</li>");
}
template.print("</ul>");
And if you need it:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2018 10:04 AM
I'm unsure why I can't call the fields from the kb_knowledge table, it was my understanding that the sysapproval.table method was the way to do so.
I'm thinking this may only work for tables extended from, and including, Task.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2018 10:29 AM
Thanks for looking into this. It's disappointing how needlessly complicated this will be when compared to something such as the change approval notification that gets sent out.
Example with same sysapproval. logic applied:
Change approval notifications work flawlessly. No clue why knowledge approvals are so much more complicated.
I tried using an email template, similar to the change approval template above with sysapproval.fields and still no luck. I will look into what you posted to see if there is something I can gather from it.