Change a work note on update???

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2017 01:54 PM
I think I have gone off my rocker again. I'm trying to do a search and replace when work notes changes and what I get is this
User Enters
Hi there replace this.
System adds to the work notes
Hi there replace {DELETED}.
Hi there replace this.
So how do I clear out a work note?
I know I can just go to the sys_journal_field table and to do this but at this point I want to know if its even possible to dump a work note on update.
Things tried
current.work_notes = "";
current.work_notes = "NULL";
current.setValue("work_notes", "");
All of the above resulted in getting what I entered in the field and also what the value was altered to.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2017 02:21 PM
Hello Drew,
You may find the below thread helpful.
https://www.servicenowguru.com/system-definition/remove-activity-log-journal-entries/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2017 02:35 PM
So I have to edit 3 tables????
Why can't I just do a current.work_notes = "SOME NEW VALUE" on insert or update, it would be so much easier?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2017 02:26 PM
You didn't say if this action should happen interactively, or if you're running a scheduled job to do this.
If you are using interactive logic, have you tried using an onSubmit client script with something like the following command?
g_form.setValue('work_notes', '');
For information on g_form see http://wiki.servicenow.com/index.php?title=GlideForm_(g_form)#gsc.tab=0
For information on client scripts see http://wiki.servicenow.com/index.php?title=Client_Scripts

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2017 02:30 PM
I would like to do it on the server using a business rule.