Recall in Approval Process for
Non-Submitter/Approver
Introduction
Approval process is an automated process and use to approve records and
specifies the actions to be taken when a record is approved/rejected/recalled for approval.
In Standard
Approval Process Functionality, only Admin, Record Owner and Approval Submitter
can recall the approval process.
Business
Problem
User wants to change the
record value or unfortunately user submit the record for approval. For these
cases, User cannot recall the process. They need Admin permission to recall the
record because recall button is not visible for non-submitter.
Solution
The problem can be solved by using Apex class with
Email Service Functionality
1. Create an Apex Class
2. Create an Email Service and call the Apex Class
Fig.1 Process Flow
Apex Class:
The content of Apex Class as follows:
global class my Handler implements Messaging.InboundEmailHandler
{
global Messaging.InboundEmailResult handleInboundEmail
(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope)
{
//Add your Logic here
return emailresult;
}
}
Call the Apex class in the Email Services:
To create email services,
1.
GoTo Setup | Develop | Email
Services
2.
Create a New Email Address and Associate
the Email Service with the Apex class which was created.
Reply to Message:
Approval process
will send an email alert to the User to Recall the record once the Record is submitted
for Approval along with Record information and Service Email Address (Reply
To).
·
User should click reply with Mail
Content as Recalled within “<> “ (Angular Bracket) in the Received mail.
Example: <recalled>
Note: Subject is defined in the Apex class.
The Record is Recalled
The Status of the
Record is changed from Pending to Recalled. Then the User modify the Record and
give Submit for Approval for Further process.
Conclusion
Recall Process is not Standard functionality in salesforce
for Non-Submitter. Through Apex class and Email Service feature can easily
recall the Approval without logging into salesforce for Non-submitter/approver.