The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to ADD event creator name in email body

Deep_D
Tera Contributor

Hi All,

 

In Email Body how can we add event creator name for incident 

 

Hello,

Incident: ${number} has been created

Lob: ${u_lob}
Customer: ${u_impacted_customer_s }
Category: ${category}
Impacted Business Service: ${u_impacted_ci_s}
Priority: ${priority}
Summary: ${short_description}
Notes: ${work_notes_list}

Created by

 

Thanks You

2 REPLIES 2

Community Alums
Not applicable

Hi @Deep_D ,

event.user_id

and

event.user_name

to get the user id and user name from the event. Then you can just use GR to get the information you want

Here is the sample code :

(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
    /* Optional EmailOutbound */
    email, /* Optional GlideRecord */ email_action,
    /* Optional GlideRecord */
    event) {

    var userGr = new GlideRecord('sys_user');
    userGr.get(event.user_id);
    if (userGr.u_enable_email_signature == true) {
        template.print(userGr.u_email_signature.replace(/\n/g, "<br>"));
    }

})(current, template, email, email_action, event);

 

Tony Chatfield1
Kilo Patron

Hi, normally you would pass the value\content that you wanted to use via one of the event parameters and then populate in your message body via ${event.parm1} or ${event.parm2}. Alternatively, you could possibly use a notification_email_script to lookup\map values via sys_updated_by values.