How to write to Additional Comments on Incident form in a Business Rule?

gjz
Mega Sage

I have a requirement to split the resolution field on an Incident into internal and customer facing resolution notes and to make the customer facing resolution notes visible to the customer on the Service Portal.  Since I don't want to modify the Service Portal widget, I chose to use a business rule to copy the customer facing resolution notes to the Additional comments (customer facing) on the incident form.  However, the activity log marks it as a field change and does not add it to the customer notes.  Can anyone help me get it to work?

On before Insert or Update Business Rule: (I tried both lines of code, neither works)

find_real_file.png

Resolution notes on the INC ticket: (I want "customer resolution notes" to display in the Service Portal)

find_real_file.png

What it looks like on the INC ticket in the activities formatter: (scroll to the right to see how it's recorded in the activities formatter)

find_real_file.png

Here is what the user sees on the Service Portal: (you have to scroll to the right to see the rest of this, too)

find_real_file.png

TIA!

1 ACCEPTED SOLUTION

gjz
Mega Sage

For those who may be looking for the answer, I finally found it.

current.comments.setJournalEntry('Resolution:\n' + current.close_notes);

View solution in original post

2 REPLIES 2

SanjivMeher
Kilo Patron
Kilo Patron

current.comments = current.close_notes;

Should work in a onBefore Business rule.

 

Are you sure 'close_notes' is the correct field?

 

Also add below and try

current.comments = current.close_notes;

current.comments = 'Testing my notes';


Please mark this response as correct or helpful if it assisted you with your question.

gjz
Mega Sage

For those who may be looking for the answer, I finally found it.

current.comments.setJournalEntry('Resolution:\n' + current.close_notes);