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

Boyan1
Kilo Sage

Hello,

You can embed a picture in the notification, that can act like a button. I have done the following - in db_image table, picture is updated, then it is referenced in the href tag as below

 "<a href=\"" + URL + "\"><img src=\"PIC.jpgx\" /></a>"

 

Of course, the URL need to be generated dynamically.

Best regards,

Boyan

where can i add this "<a href=\"" + URL + "\"><img src=\"PIC.jpgx\" /></a>" in above code. Please let me know

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

In outlook email. I am not able to see the button. Please see the below screenshot.

find_real_file.png