Font & size Additional Comments in email System Notifications

AdamUMC
Giga Guru

Hi there,

I want to edit the font and size of the additional comments that are send within a email System Notification, from the default font, color and size, to "Trebuchet MS", "White", "10px".

I have tried several solutions from this community (see here below), but sadly, none of them works.
Anyone more tips/suggestions?

Thanks!

- https://community.servicenow.com/community?id=community_question&sys_id=24ee27731bb67f80fff162c4bd4bcb5b
- https://community.servicenow.com/community?id=community_question&sys_id=187043e1db98dbc01dcaf3231f96195d

1 ACCEPTED SOLUTION

Please use below:-

 

var journalEntry = new GlideRecord('sys_journal_field');

journalEntry.addQuery('element', 'comments'); //Provide name of the journal field, here the field name is 'comments'

journalEntry.addQuery('element_id', current.sys_id); //Provide sys_id of the record on which the journal field is present, i.e, sys_id of the change request
journalEntry.orderByDesc('sys_created_on');
journalEntry.setLimit(1)
journalEntry.query();

while(journalEntry.next()) {


template.print('<p><span style="color: #ff0000; font-family: trebuchet ms, geneva; font-size: 10pt;"><strong>');

template.print('Comment : ' + journalEntry.value);

template.print('</strong></span></p>');

}

 

Please mark answer correct/helpful based on Impact.

View solution in original post

29 REPLIES 29

The way it gets captured in the Journal table it will be displayed on the Notification. Check on the Journal table how it was captured for the comment element in the value field.

find_real_file.png

Please mark answer correct/helpful based on impact.

Thanks!

It's stored with blank lines, please see attached picture.
When I put this text in the "Additional Comments" field, the blank lines are present.

EDIT: I don't know why, but it seems I can only find the "Additional Comments" entry. But the Incident itself, has the same "Resolution note" as well.


find_real_file.png

How does it appear in email notification?

In the email system notification preview, the "Additional Comment" appears with blank lines, the "Resolution note" without.

Will post two screenshots soon.


EDIT:

1.) Additional Comment through our email script (without name, date & time stamp):
find_real_file.png

2.) Resolution Note through "${close_notes}".
find_real_file.png