creating a Button for the Approval or Reject on email script notification

Peter Williams
Kilo Sage

I am creating an email script to approve or reject an RITM request.

 

this is my script but it doesnt seem to work, any help will be appricated

 

template.print('<p style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">');
template.print('<button onclick="location.href=\'mailto:mailto.approval\';" style="display: inline-block; padding: 10px 20px; background-color: #4CAF50; color: white; text-decoration: none; border-radius: 4px; font-size: 16px; margin-top: 10px; border: none; cursor: pointer;">Approve</button>');
template.print('<button onclick="location.href=\'mailto:mailto.rejection\';" style="display: inline-block; padding: 10px 20px; background-color: #FF0000; color: white; text-decoration: none; border-radius: 4px; font-size: 16px; margin-top: 10px; margin-left: 10px; border: none; cursor: pointer;">Reject</button>');
template.print('</p>');

3 REPLIES 3

Amit Gujarathi
Giga Sage
Giga Sage

HI @Peter Williams ,
I trust you are doing great.
I'll provide you with a revised script that should help you achieve your goal.

template.print('<p style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;">');
template.print('<a href="mailto:mailto.approval" style="display: inline-block; padding: 10px 20px; background-color: #4CAF50; color: white; text-decoration: none; border-radius: 4px; font-size: 16px; margin-top: 10px; border: none; cursor: pointer;">Approve</a>');
template.print('<a href="mailto:mailto.rejection" style="display: inline-block; padding: 10px 20px; background-color: #FF0000; color: white; text-decoration: none; border-radius: 4px; font-size: 16px; margin-top: 10px; margin-left: 10px; border: none; cursor: pointer;">Reject</a>');

 


Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi



i tried it and now getting this:

PeterWilliams_0-1686065620739.png

 

do you have any other suggestions i can do