Mass Update Knowledge Articles
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2023 11:07 AM
Our Self Service KB has a default image put into the escalation path that gives end users the different avenues that they can use to contact IT for support. We have an updated image we want to replace it with for any new and current self service articles. I found a script I was able to modify to attempt to automate it, but was unable to get it to work.
// Build Query
var knowledge = new GlideRecord('kb_knowledge');
// Execute the query
knowledge.query();
// Print the number of records that will be updated
gs.print(knowledge.getRowCount() + ' records were found.');
// Run a while loop and interate through the records found
while (knowledge.next()) {
// Update the Escalation Field with the new image
knowledge.u_kb_escalation_path = '<p><img src="How%20to%20Get%20IT%20Support.png" width="751" height="350"/></p>';
// Updates the record in question
knowledge.update();
}
I'm guessing this might be because the articles are published. Is there a way to get this script to work or would we need to make this change by hand?