- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2020 01:45 PM
We have the Incident Create Knowledge business rule active, and it works fairly well.
We are implmenting knowledge article templates, and I would like to tweak the business rule to apply a specific template to KB's created by that business rule. However there is no "template" field on the kb_knowledge table, the article template tables are essentially children of it.
Is there a way to do this?
Thanks,
Jack
Solved! Go to Solution.
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2020 09:08 AM
Resolution 1. The Business Rule "Incident Create Knowledge" can be modified like below https://INSTANCE.service-now.com/nav_to.do?uri=sys_script.do?sys_id=245748ecc61122aa016c02dffbff7464
2. In the submitDirect() function, you can query for the kb article template table instead of kb_knowledge.
3. To apply template please use applyTemplate("TEMPLATE_NAME"); EG: kb.applyTemplate("kb_template_kcs_article");
4. Please find the documentation for the above method https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/form-administration/reference/r_ScriptedTemplates.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2020 01:56 PM
Also, this might be related. Does anyone know if you can apply a template to an article that was created without one?
Jack
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2020 09:08 AM
Resolution 1. The Business Rule "Incident Create Knowledge" can be modified like below https://INSTANCE.service-now.com/nav_to.do?uri=sys_script.do?sys_id=245748ecc61122aa016c02dffbff7464
2. In the submitDirect() function, you can query for the kb article template table instead of kb_knowledge.
3. To apply template please use applyTemplate("TEMPLATE_NAME"); EG: kb.applyTemplate("kb_template_kcs_article");
4. Please find the documentation for the above method https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/form-administration/reference/r_ScriptedTemplates.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2020 01:04 PM
You can also create/edit a new mapping to use a different template. Docs here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2021 11:00 AM
hi
I was trying to figure this out and came up with this solution. Knowledge articles have a <sys_class_name> field that references the template name. If you set this field to the name of your template name, it should use that template when making the article.
You can set it like this:
kb.sys_class_name = 'Template name here';
I recommend checking the XML of your article to see the exact name of that template being referenced.