I want to include the Username who made the comments in the Push Notification

Sundar akula
Tera Contributor

Hello all,

 

need your help. I have created a push notification, when the work notes are added the user gets notified. 

 

Here is the sample : Incident ${number} -- Work Notes added

 

But what I need is the notification should also include the name of the person who has made the comments in the Notification

 

Sample of what I need 

Incident ${number} work notes added by <Firstname Lastname>

 

 

 

1 ACCEPTED SOLUTION

Updated by is the users ID, not full name. 

But if ${} notation works in SMS, we should be able to use a mail_script, right? It's a long shot, but it just might work. 

 

View solution in original post

6 REPLIES 6

Runjay Patel
Giga Sage

Hi @Sundar akula ,

you can take updated by like below 

Incident ${number} work notes added by ${sys_updated_by}

Updated by is the users ID, not full name. 

But if ${} notation works in SMS, we should be able to use a mail_script, right? It's a long shot, but it just might work. 

 

Hey Runjay I tried but it is giving the UserID. Is there a way where I can display the Full name of the User

 

If you use a Notification Script, something along the lines of:

var userRecord = new GlideRecord("sys_user");
userRecord.get("user_name", current.sys_updated_by);

if(userRecord.isValidRecord()){
    template.print(userRecord.getValue("name");
}

If you name it get_name, then you could use ${mail_script:get_name}