Hide name of support agent in email for Additional Comment

VShine
Mega Guru

Hello Experts,

I have requirement to hide name of HR agent hidden in email notification for "Case Commented".

If Additional Comment is added by "HR Agent" it should appear as "HR Agent" instead of User name.

If added by customer /opened_for, then display the name.

This needs to be in "Email". I tried using mail script but no success. Here is the mail script I got from another community post.

find_real_file.pngemail is generated with following output

find_real_file.png

 

1 ACCEPTED SOLUTION

Oh that's an easy enough fix.  Variable references are CAPS sensitive in javascript, another good reason to copy+paste your variables instead of typing them.  Just match case and you should get rid of that error, because "ticketId" is completely different from "ticketID"

View solution in original post

16 REPLIES 16

@Justin  thank you for quick reply...When I am running this as "background script", this is what I am getting as output. Its not doing anything.

find_real_file.png

So you would use that script to iterate over the comments and include/exclude whatever information you want.  Don't want the Commented By? Don't add it!  You can do whatever formatting you'd like to make it mirror the ${comments} you'd like, and then your mail script would replace that ${comments}.

@Justin I beg a pardon. Its working in background script as expected, but not working when try it for mail script. 

find_real_file.png