Hide Standard Template option for my Custom knowledge Bases
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2023 03:00 AM
Hi,
I have created one article template and I want to show that as only option to create knowledge. For example my knowledge base is New Product and I have created Product Knowledge as an article template.
I want Product Knowledge to be the only template for New Product Knowledge Base.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2024 01:37 PM
i have the same requirement. @Nikita Nikita did you manage to achieve it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2025 10:28 AM
One way to allow for the standard template to be selective is adding the function "getArticleTemplatesForKnowledgeBase" to the ArticleTemplateUtil script include and query/specify which KB's should include the standard template.
This could be improved to call a property or decision table.
getArticleTemplatesForKnowledgeBase: function(kbId, addNames) {
var gr = new GlideRecord('kb_template_m2m_knowledge_base');
gr.addQuery('kb_knowledge_base', kbId);
gr.orderBy('kb_article_template');
gr.query();
//customized block starts here
var templates = {};
if (addNames) {
var grKB = new GlideRecord('kb_knowledge_base');
if (grKB.get(kbId)) {
var title = grKB.title.toString();
if (title.includes('IT') || title.includes('Customer')) {
templates['kb_knowledge'] = gs.getMessage('Standard');
}
}
}
//customized block ends here
if (!gr.hasNext()) {
var template = new GlideRecord('kb_article_template');
template.addActiveQuery();
template.orderBy('article_template');
template.query();
while (template.next()) {
if (addNames)
templates[template.child_table] = this._getFieldLabelInUserLang(template.child_table, null, template.getDisplayValue('article_template'));
else
templates[template.child_table] = true;
}
return templates;
} else {
while (gr.next()) {
if (gr.kb_article_template.active) {
if (addNames)
templates[gr.kb_article_template.child_table] = this._getFieldLabelInUserLang(gr.kb_article_template.child_table, null, gr.kb_article_template.getDisplayValue());
else
templates[gr.kb_article_template.child_table] = true;
}
}
}
return templates;
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-02-2025 05:38 AM
Hello,
You can disable the standard article template by opening sys_wizard_answer table and filtering for Question = Article template selector and then disabling "Standard".
Aniko