When email sent " you have mentioned in..." email when we click on email it should route to the inc

kamlesh
Tera Contributor

Please provide me email script

1 REPLY 1

Jaspal Singh
Mega Patron
Mega Patron

Hi Kamlesh,

Create mail script named taketorecordActivityStream as below.

(function runMailScript(current, template, email, email_action, event) {

    var recordis = new GlideRecord('task');
    recordis.addQuery('sys_id', current.document);
    recordis.query();
    if (recordis.next()) {
        var urlis = '/' + recordis.sys_class_name + '.do?sys_id=' + recordis.sys_id;
        template.print('<a href="' + urlis + '">' + gs.getMessage(recordis.number) + '</a>');
    }

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

 Call the mail script in the notification body on the live_notification table in format as below.

${mail_script:taketorecordActivityStream}