Change a work note on update???

DrewW
Mega Sage
Mega Sage

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.

8 REPLIES 8

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

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?


HugoFirst
Kilo Sage

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  


I would like to do it on the server using a business rule.