- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2022 05:18 PM
How do I revert a published Knowledge article back to draft status?
Is the only way to make a published Knowledge article temporarily private is to deactivate it?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2022 06:45 PM
Here is a background script which does that
var kb = new GlideRecord('kb_knowledge');
kb.addQuery('sys_id','f6a3f2091ba8911009ad9758b04bcb7b');
kb.addQuery('workflow_state','published');
kb.query();
if(kb.next())
{
kb.workflow_state= 'draft';
kb.setWorkflow(false); //Do not run business rules
kb.autoSysFields(false); //Do not update system field
kb.update();
}
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2022 06:45 PM
Here is a background script which does that
var kb = new GlideRecord('kb_knowledge');
kb.addQuery('sys_id','f6a3f2091ba8911009ad9758b04bcb7b');
kb.addQuery('workflow_state','published');
kb.query();
if(kb.next())
{
kb.workflow_state= 'draft';
kb.setWorkflow(false); //Do not run business rules
kb.autoSysFields(false); //Do not update system field
kb.update();
}
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2022 10:19 PM
You can use User Criteria on Knowledge article to control the visibility of the article
Refer doc
https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/product/knowledge-management/task/t_SelectUCArticle.html
Harish