
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2019 01:32 PM
When users select the "Create Article" button, they must select the knowledge base and then the appropriate template. If they click the left hand menu "Create New" the active templates are shown.
We have removed Standard from the interceptors so we can use a "Default" template instead. However the "Standard" template is still shown on the "Create Article" template options. (see below). How do I deactivate/remove it as an option
Alternately, could we just make the "Create Article" button default to the same screen as the "Create New" menu option
Solved! Go to Solution.
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2020 03:44 AM
Hi
I found a way to fix this. If you are still looking for a possible way then you may try below.
1. Open "ArticleTemplateUtil" script include and paste the below code.
var ArticleTemplateUtil = Class.create();
ArticleTemplateUtil.prototype = Object.extendsObject(ArticleTemplateUtilSNC,{
getTemplatesDataForKB: function()
{
var kbId = this.getParameter("sysparm_kbid");
var templates = this.getCanContributeTemplatesListCustom(kbId);
var result = {
templates: templates,
kb: kbId
};
return JSON.stringify(result);
},
getCanContributeTemplatesListCustom: function(kbId){
var kbGr = new GlideRecord('kb_knowledge_base');
if(kbGr.get(kbId) && SNC.KnowledgeHelper.canContribute(kbGr))
return this.getArticleTemplatesForKnowledgeBaseCustom(kbId,false);
else
return {};
},
getArticleTemplatesForKnowledgeBaseCustom: function(kbId, addNames){
var gr = new GlideRecord('kb_template_m2m_knowledge_base');
gr.addQuery('kb_knowledge_base',kbId);
gr.query();
var templates = {};
// if(addNames)
// templates['kb_knowledge'] = gs.getMessage('Standard');
// else
//templates['kb_knowledge'] = true;
if(!gr.hasNext()){
var template = new GlideRecord('kb_article_template');
template.addActiveQuery();
template.query();
while(template.next()){
if(!addNames)
templates[template.child_table] = 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] = gr.kb_article_template.getDisplayValue();
else
templates[gr.kb_article_template.child_table] = true;
}
}
}
return templates;
},
type: 'ArticleTemplateUtil'
});
in "kb_knowledge_create" UI page and 60th line of client script is getting list of available templates via GlideAjax. So, I tried by overriding the method "getTemplatesDataForKB" in ArticleTemplateUtil script include as base system script include ArticleTemplateUtilSNC is readonly and protected.
You may tweak the code as just thought of sharing what I have tried for a similar use case

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2019 11:52 PM
Hi,
you have to go to the OOTB Interceptior Article Template Selector and configure the field Intercepts to kb_knowledge.do as shown below:
Then, you need to create a new Application Module (or change the OOTB 'Create New'), select the Link Type to New Record and Table to kb_knowledge as shown below:
Just tried it in my personal instance, it works fine, below the result:
If I have answered your question, please mark my response as correct and/or helpful.
Thank you very much
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2019 08:36 AM
Already updated interceptors. As you can see in my example: Standard is not showing when you click the "Create New" left hand pane.
I'm talking about the "Create Article" button on the top right of the home page. The "Create Article" button looks like this:
And goes to the here showing Standard despite the interceptor being turned off/replaced:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2019 11:50 PM
For doing this, you need to customize the UI Page kb_knowledge_create.
If I have answered your question, please mark my response as correct and/or helpful.
Thank you very much
Cheers
Alberto

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2019 08:12 AM
I couldn't figure out how to edit the page to remove Create button (tried to remove <button></button> in UI page create but the page did not change.
I need more specific info on what to change please.