We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

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

Ankur Bawiskar
Tera Patron

Hi,

what's happening when the buttons are clicked?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

 

it is considered as image only. when I click the approve button it will go to format picture menu on outlook

 

Thanks

Srini

Hi,

check this blog

https://community.servicenow.com/community?id=community_blog&sys_id=8080e8dc1babb380d01143f6fe4bcb0e

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

My code was written as per the above blog only but still having this issue.

 

Thanks

Srini