Post Work notes on RITM using script

Rajanmehta
Mega Guru

Hello,

I am trying to add some work notes on an existing RITM using script (below). I am able to see the record on sys_journal_filed table but doesn't show up on RITM. What am  I missing? Please advise.

Thanks,

Rajan 

 

var grJrnl = new GlideRecord('sys_journal_field');
grJrnl.setValue('name','sc_req_item');
grJrnl.setValue('value','Testing....Again');
grJrnl.setValue('element','work_notes');
grJrnl.setValue('element_id','sys_id of RITM');
grJrnl.insert();

 

 

 

 

 

1 ACCEPTED SOLUTION

Allen Andreas
Administrator
Administrator

Hello,

I'm unsure where this script is at (like business rule or what) or why you're gliding to journal_field table...but you can simply do:

variable.work_notes = "Text here";

or whatever variable holds your record and do work_notes after it.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

5 REPLIES 5

Hi @Ishita Shrivastava - this worked for me! Question, what would I write to be able to add another preloaded entry/line within work notes?

 

I appreciate your help!