Remove/Delete a portion of Worknote from a Service Request

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 10:54 PM
Can we remove a portion of a comment or the whole comment in the 'Worknote' section of a Service Request.
Let's say a user has put a worknote and mistakenly write the password in the Service Request and save the form. So, this worknote is visible to public who can view the Service Request.
So, I wanted to do 2 things here -
1. How to remove/delete only the password which consists of few letters of the whole line.
2. How to remove/delete the whole comment which was added to the worknote section of the Service Request. I don't want to remove the entire worknotes which were there in the ticket.
Please help me to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2023 11:17 PM
You can do this in the sys_journal_field table. The worknotes and comments are stored in there.
However you also might need to check if there's a record also stored in the sys_audit table for the comment.
Then you also need to delete the sys_history_set record for the Service Request record.
Basically Servicenow stores the comments in a separate table and then stores an audit record of the changes to any fields (that support history) on the sys_audit table.
After modifying your comment field the sys_audit table will still show the old value and possibly the new value.
You can either modify the audit record or delete it depending on your need.
After modifying the audit records you then need to delete the sys_history_set record as it stores history information and can still store the incorrect value even after modifying the comment and audit. You can safely delete it as it will be automatically rebuilt when viewing the related record, but now it will also update the history data to reflect your changes.
Do note that if there are any email automations etc. then it's possible that the comment is also visible in the email logs.