Replace a line text for articles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 11:35 AM
I need to replace a text from a few articles that have the same text and I need to replace it with another one.
I don't need to replace all the text just a line of text.
Any idea how can i do this using background script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 11:52 AM
Hi @Abigail
Below link might help you...!!!
https://www.servicenow.com/community/itsm-forum/replace-string-within-knowledge-article/m-p/2338953
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 12:14 PM
Hello @Vishal Birajdar
The problem is that I need to change the Article Body, and is not working when i try to change the text.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 12:30 PM - edited 09-27-2023 12:32 PM
Hi @Abigail
Update the while loop as follows
grKbKnowledge.update();
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates