Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Copy resolution notes to additional comments

rambo1
Tera Guru

Hi, 

I have resolution notes(closed_notes) and additional comments (comments) which is a journal field on incident form, and both are mandatory during resolving a incident. Now, I want resolution notes to be copied to additional comments, when resolver fills additional comments and resolution notes and resolves incident, additional comments should be appended by resolution notes.

I have tried before update business rule with script:

current.comments = current.closed_notes;

But this did not work, any other way to copy resolution notes to additional comments?

11 REPLIES 11

Priyanka114
Tera Contributor

Use business rule as below,

 

When: before

Insert: true

Update: true

Advanced: true

Condition: current.close_notes.changes()

Script: current.comments.setJournalEntry(current.close_notes);

 

This is working for me. 🙂

Hi Priyanka,

Yes the above script is working but the issue is both the fields are mandatory on my incident form during resolving a incident. So now I want that whenever I fill resolution notes(closed_notes) that resolution note should be copied into comments which is mandatory field(keep this in mind) before updating or saving the form. Now how I can copy that resolution notes into comments before saving the form.