Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Retire IT Knowledge Base Articles - Background Script

## 📘 Overview
This ServiceNow **Background Script** is designed to automatically retire all Knowledge Articles associated with the **IT Knowledge Base** (`kb_knowledge_base` = "IT").

It helps administrators clean up outdated or inactive articles in bulk, ensuring that end-users can only access relevant and up-to-date IT knowledge content.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var article = new GlideRecord("kb_knowledge");
article.addQuery("workflow_state","published");
article.addQuery("kb_knowledge_base","a7e8a78bff0221009b20ffffffffff17") // Sys ID of the IT Knowledge base. You can provide the sys Id of any knowledge base.
article.query();
while(article.next()){
article.workflow_state = "retired";
article.update();
}
Loading