Work notes is not populating via setValue()

123456789456123
Kilo Contributor

This might be simple but I have never had to work with journal entries before. I was wondering if they behave differently that normal string fields. Here is an example/problem I am facing:

I would like to update the Work Notes field but am having no success. Eventually this will be run from a workflow script but currently I am testing this in a business rule.

var info = 'data';

var gr = new GlideRecord('table name here');

gr.initialize();

//see below

gr.insert();

gr.update();

                  Below are the multiple way I have tried to insert data into the work notes field with zero luck.

gr.setValue('work_notes', info);

gr.setValue('work_notes', 'data');

current.work_notes = info;

current.work_notes.SetJournalEntry(info);

If anyone could tell / explain to me what it is that I am doing wrong would be really helpful.

Thank you.

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi Ben,



Try using



gr.work_notes='Data';



find_real_file.png


View solution in original post

6 REPLIES 6

Jaspal Singh
Mega Patron
Mega Patron

Hi Ben,



Try using



gr.work_notes='Data';



find_real_file.png


Thank you. I knew I was missing something... Have a good day,  


Hi Jaspal,
is there any way to add multiple work notes in a single update?

Thank you!!! Help me a lot!