Is it possible to change notification comments added name with specific user name

Hari S1
Tera Contributor

Hi,

 

Is it possible to change notification comments added name(highlighted below) with specific user name for all the time when comments added?

 

HariS1_0-1721890733980.png

 

 

Thank you

3 REPLIES 3

Yashsvi
Kilo Sage

Hi @Hari S1,

To always show a specific user name for notification comments in ServiceNow, you can use a business rule or modify the email notification template. Here's a quick summary:

Modify Email Notification

  1. Go to System Notification > Email > Notifications.
  2. Edit the relevant notification.
  3. Replace ${comments.added_by} with the specific user name (e.g., John Doe) in the message content.
  4. Save the notification.

Use a Business Rule:

Set it to run "Before" or "After" the appropriate condition

 

 

(function executeRule(current, previous /*null when async*/) {
    // Set the comments added by a specific user
    current.comments.setJournalEntry("Comment added by John Doe:\n" + current.comments.getJournalEntry(1));
    current.update();
})(current, previous);

 

 

Thank you, please make helpful if you accept the solution.

Hari S1
Tera Contributor

Hi @Yashsvi ,

Thanks for the reply.

 

I tried the notification part which you mentioned.
Is this the right way to add the line in notification:

 

HariS1_0-1721894761269.png

 

 

 

Thank you

Hari S1
Tera Contributor

Hi All,

Can someone please help me on this issue?

 

 

Thank you in advance.