Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

In email body ,when clicked the approve button its not working

Srini19
Tera Contributor

Hi,

I have the below code in email script. when I click the approve or reject button it is not working but when I click control and click it is working. please let me know what is wrong here.

var apButStr = '<div><a href="mailto:now05@service-now.com?subject=re:' + gr.number + ' - approve&body=' + gr.number + ' - approve' + '"><br /><img style="align: baseline;" title="Click this button to mark approved" src="/approveButton.png" alt="Approved" width="142" height="41" align="baseline" /></a>';

var rejButStr = '<a href="mailto:now05@service-now.com?subject=re:' + gr.number + ' - reject&body=' + gr.number + ' - Reject' + "%0D%0A" + "Reason for Rejection:" + '"><img style="align: baseline;" title="Click this button to mark rejected" src="/rejectButton.png" alt="Rejected" width="142" height="41" align="baseline" /></a></div>';

 

Thanks

Srini

6 REPLIES 6

Saiganeshraja
Kilo Sage

Replace apporve button with this:

'<div><a href="mailto:now05@service-now.com?subject=re:' + gr.number + ' - approve&body=' + gr.number + ' - approve' + '"><br /><img style="align: baseline;" title="Click this button to mark approved" src="/approveButton.png" alt="Approved" width="142" height="41" align="baseline" /></a></div>'

 

and then give a try.

 

Mark correct and helpful if it helps

when i use this code, both button is not visible.

 

Thanks

Srini