I have created a link "click here to reopen the incident" on Email script but it should be button not link on email. can any one help me.

SP22
Mega Sage
Mega Sage

I have created a link "click here to reopen the incident" on Email script but it should be button not link on email. can any one help me where i am missing the point in below script.

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

    var url = '<a href="mailto:' + gs.getProperty('glide.email.reopen.incident') + '?subject=Re: Please reopen' + current.number + '&amp;body=You can type a message before this text. Please do not edit the Subject or remove the following text: , or the record will not reopen%0D%0A' + email.watermark + '">' + 'click here to reopen the incident' + '</a>';
    template.print(url);


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

 

find_real_file.png

Thanks

SP

1 ACCEPTED SOLUTION

Hello, 

It should be like this:

var url = '<a href="mailto:' + gs.getProperty('glide.email.reopen.incident') + '?subject=Re: Please reopen' + current.number + '&amp;body=You can type a message before this text.

Please do not edit the Subject or remove the following text: , or the record will not reopen%0D%0A' + email.watermark + '"><img src=\"PIC.jpgx\" /></a>';

 

Best regards,
Boyan

View solution in original post

13 REPLIES 13

In case you want to customize the styling of this button, or any other cosmetic changes then you can copy the OOB Notification email script and create a new one and make changes on your new custom Notification email script.

For reference attaching the link for Notification script as well:

https://instance.service-now.com/nav_to.do?uri=sys_script_email.do?sys_id=f25bc270d711120035ae23c7ce610323

Replace "instance' with your instance name.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hi,

Did you try the solution which I have proposed. Feature is available OOB, so why do you want to customize by adding a new code?

Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

when i click on that button it should redirect to outlook email not to incident form.

Thanks for your response.

okay. Not an issue. Please refer the below blog which contains exactly what you are looking for:

https://community.servicenow.com/community?id=community_article&sys_id=b9023a9ddbc4e4d43daa1ea6689619af

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

 

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke