Comment
Mega Sage

Hi all,

Thanks @Jaspal Singh, for sharing the code its really helpful.

I have tried the mentioned code and its showing undefined in the notification.

That is beacuse the script include call in the email script.

Please use below code in the both the email scripts .

  a. Approve: email.button.approve.insert

var img = "/Approve.png";

var response = "approve";

var emailbod = "I approve this request.";

template.print(new global.renderMailtoButton().renderMailtoButton(img, response, emailbod));

b. Reject: email.button.reject.insert

var img = "/Reject.png";

var response = "reject";

var emailbod = "I reject this request.";

template.print(new global.renderMailtoButton().renderMailtoButton(img, response, emailbod));

 

I hope it helps.

Please mark helpful/correct.

Thanks,

Neha