function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Swamy PSwamy P 

Unable to Approve/Reject a record via Email Response for the Visualforce Email Template

Hello Everyone,

I have created visualforce email template and tagged to approval process which will get trigger to Approver when some one request for approval.
 
When Approver tries to approve/reject through the email he/she received, approval response is not changing accordingly in salesforce.

Can some one please suggest what might be the problem here. Is the problem with visualforce template or any ?

Thanks in advance!!!

 
karthikeyan perumalkarthikeyan perumal
Hello, 

Kinldy follow below points is may helps to resolved this issue. 

0. Enable Email Approval Response checkbox in Workflow & Approvals settings
 User-added image

If you navigate to Setup > Workflow & Approvals > Process Automation Settings
There is a checkbox for 
Enabling email approval response lets users reply to email approval requests by typing APPROVE or REJECT in the first line and adding comments in the second line.
 
You might want to double-check whether this checkbox is checked.

if its nor working try follow below steps using custome component: 

https://developer.salesforce.com/forums/?id=906F00000008oiKIAQ

https://help.salesforce.com/articleView?id=000194297&type=1


Hope this will help you. Mark it solved if its works for you.

Thanks
karthik
 
Swamy PSwamy P
Hello Karthikeyan, I've enabled that option and user profile also had API Enabled option but don't know why records are not approving by email response.
karthikeyan perumalkarthikeyan perumal
Hello, 

KInldy go through below likes for  Email templete design with proper merge fields for Approve and refject.

http://www.mstsolutions.com/blog/content/email-approval-response
https://help.salesforce.com/articleView?id=000194297&type=1


Hope this will help

Thanks
karthik
 
Swamy PSwamy P
Hello Karthikeyan, I have followed the steps which are mentioned in the above links but still didn't work. Still i was not able to Approve the records via Email Response.
Khushboo VaidyaKhushboo Vaidya
Hi Swamy,

Apart from, Enable Email Approval Response: Enabled,API Enabled permission, we need to create an Email Service and assign Email Service address to replyTo attribute under <messaging:emailTemplate> tag in a Visualforce Email Template. Can you guys please check and confirm if that works for you? Also, please mark this as the Best answer to resolve this question.
 
Regards,
Khushboo Vaidya
Francis CrumpFrancis Crump
Another possible pitfall here is if you enter the inbound email field into the approval settings, manage, new/edit, inbound approver email editbox it can get cut off so be sure to use the inbound approver (long) editbox to enter the email.