Email notification get name of user who commented

CE_
Tera Contributor

Hi,

I'm configuring a notification and email templates on "case commented". I'm trying to get the user who wrote the comment to be captured. I tried with the solution in this thread but it didnt work: https://www.servicenow.com/community/spm-forum/how-to-get-quot-updated-by-quot-name-in-the-notificat....

So I want it to be like
Best regards,
"First name (not last name) of user who wrote the comment"


How do I fix this? 

5 REPLIES 5

Thota Naga Jyo1
Tera Contributor

Use this script. Its working for me

var gr = new GlideRecord('sys_user');

     gr.addQuery('user_name',current.sys_updated_by);
gr.query();
if(gr.next()){

   template.print(gr.name);