- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 12:46 AM
Hi Developers,
I have 3k articles where author is Inactive.
I wish to replace them with an Active user.
I followed steps mentioned on below link but no luck.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0787528
Currently not able to edit in List view nor in Form.
I don't wish to create a new version by checking out a Published article just to edit the Author.
Please suggest a solution on this.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 12:53 AM - edited 11-28-2022 01:06 AM
You can write background script or fix script for this:
var kb = new GlideRecord('kb_knowledge');
kb.addEncodedQuery(''); // add your query
kb.query();
while(kb.next())
{
kb.author = '' // pass the sys_id of your active author
kb.update();
}
Test all scripts in dev before executing in prod.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 12:53 AM - edited 11-28-2022 01:06 AM
You can write background script or fix script for this:
var kb = new GlideRecord('kb_knowledge');
kb.addEncodedQuery(''); // add your query
kb.query();
while(kb.next())
{
kb.author = '' // pass the sys_id of your active author
kb.update();
}
Test all scripts in dev before executing in prod.
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 01:08 AM
Thank you. I tried this & it doesn't create a version.
Another doubt, From the below link , I could not follow this part.
How can we have automatic knowledge subscriptions to new Author which we are updating using the script.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0852951
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2022 01:16 AM
This means that the the new author will not be subscribed to the knowledge article, the new author have to do it manually. This is more about the emails which are sent to subscribers.
Please mark the answer correct/helpful accordingly.
Raghav
MVP 2023