diff --git a/Server-Side Components/Background Scripts/Update KB Article Author/README.md b/Server-Side Components/Background Scripts/Update KB Article Author/README.md new file mode 100644 index 0000000000..e1a1344321 --- /dev/null +++ b/Server-Side Components/Background Scripts/Update KB Article Author/README.md @@ -0,0 +1,5 @@ +This script can be used to update the KB Articles author via script. + +This will be helpful in cases such as Author leaving the company, etc. + +Update the encoded query in Line 2 to filter the required kb articles. diff --git a/Server-Side Components/Background Scripts/Update KB Article Author/script.js b/Server-Side Components/Background Scripts/Update KB Article Author/script.js new file mode 100644 index 0000000000..5cec38c67c --- /dev/null +++ b/Server-Side Components/Background Scripts/Update KB Article Author/script.js @@ -0,0 +1,8 @@ +var kbGr = new GlideRecord("kb_knowledge"); +kbGr.addEncodedQuery("author=62826bf03710200044e0bfc8bcbe5df1"); //Update this filter as required +kbGr.query(); +while(kbGr.next()) +{ + kbGr.author = '6816f79cc0a8016401c5a33be04be441'; //Update with new Author details + kbGr.update(); +}