Skip to content

Commit 6b2c983

Browse files
authored
Retire Articles.js
This code will help to retire the knowledge articles in bulk.
1 parent 12c8338 commit 6b2c983

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var article = new GlidRecord("kb_knowledge");
2+
article.addQuery("workflow_state","published");
3+
article.addQuery("kb_knowledge_base","a7e8a78bff0221009b20ffffffffff17") // Sys ID of the IT Knowledge base. You can provide the sys Id of any knowledge base.
4+
article.query();
5+
while(article.next()){
6+
article.workflow_state = "retired";
7+
article.update();
8+
}

0 commit comments

Comments
 (0)