Write Work Notes per Script

moeslee
Kilo Explorer

Hello Community

Currently I try to Log a Message into this 'Activity' / Work Notes on a Requested Item / Tas

I copied a business rule that checks, if a request has a file attached, if it is, the file should be inserted into the Work Notes as a Link.
On the Wiki I found an interesting post that describes exactely what I want to achieve, but I don't get it to work. Don't get me wrong, I already found some articles with all the information I need to achieve this, my only problem is the Log into these work_notes doesn't work.

I tried the following approaches in the Business Rule:
setJournalEntry(current.comments, 'Manual Entry);
current.comments.setJournalEntry('Manual Entry);
current.work_notes.setJournalEntry('Manual Entry);
setJournalEntry(current.work_notes, 'Manual Entry);
current.update();

But no Log appeared, can anyone help me out there?

Thank you in advance

6 REPLIES 6

5 years later and this just helped me!


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

LeroyR
ServiceNow Employee
ServiceNow Employee

Too late for a solution but using toString() works.

eg:  current.work_notes = current.decision_reason.toString();