Email script Redirection to

devservicenow k
Tera Contributor

Need to Create a Notification email script to Agent workspace.

 

 

1 ACCEPTED SOLUTION

Pavankumar_1
Mega Patron

Hi @devservicenow k ,

Try below email script

(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
    /* Optional EmailOutbound */
    email, /* Optional GlideRecord */ email_action,
    /* Optional GlideRecord */
    event) {
    displayLinks();
    function displayLinks() {
        var displayLink = 'your_workspace_link';
        template.print(displayLink + "<br />");
    }
})(current, template, email, email_action, event);
If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

View solution in original post

2 REPLIES 2

Pavankumar_1
Mega Patron

Hi @devservicenow k ,

Try below email script

(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
    /* Optional EmailOutbound */
    email, /* Optional GlideRecord */ email_action,
    /* Optional GlideRecord */
    event) {
    displayLinks();
    function displayLinks() {
        var displayLink = 'your_workspace_link';
        template.print(displayLink + "<br />");
    }
})(current, template, email, email_action, event);
If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

jaheerhattiwale
Mega Sage
Mega Sage

@devservicenow k Try below code

 

(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
    /* Optional EmailOutbound */
    email, /* Optional GlideRecord */ email_action,
    /* Optional GlideRecord */
    event) {
template.print("<a href='"+WORKSPACE LINK HERE+"' target='_blank'>Workspace link</a>");
})(current, template, email, email_action, event);

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023