Sub topic 7
Actions on Submission, Approval, Rejection, and Recall
This chapter assumes you know what entry criteria, steps, and approvers are, and that you can build a basic approval process in Setup. Here you decide what the process does at each point in its life cycle.
The five action points
An approval process runs actions at fixed points. You attach actions to a point, and Salesforce runs them when the record reaches it.
| Action point | When it runs | Scope |
|---|---|---|
| Initial submission | The record is submitted | Whole process |
| Step approval | A specific step is approved | One step |
| Step rejection | A specific step is rejected | One step |
| Final approval | All steps are approved | Whole process |
| Final rejection | Any rejection ends the process | Whole process |
| Recall | The submitter pulls the record back | Whole process |
Step-level actions are optional. Most processes use only the whole-process points.
Initial submission actions
These run as soon as the record enters the process. A common use is a field update that sets Status__c to Pending Approval. Another is an email alert to the submitter's manager.
Salesforce also locks the record at submission. Locking is covered in its own chapter, so this chapter only notes that your action can still change a locked record because the process itself performs the update.
Final approval and final rejection
Final approval runs after the last step is approved. Typical actions:
- Update a field to
Approved. - Send an email alert to the submitter.
- Unlock the record, if you chose to keep it locked until now.
Final rejection runs when an approver rejects the request. Which rejection behavior applies depends on the step setting. A step can send the record to final rejection, or it can send it back to the previous approver. Typical final rejection actions:
- Update a field to
Rejected. - Notify the submitter with an email alert.
- Create a task asking the submitter to revise the record.
Recall actions
A recall happens when the submitter, or an administrator, withdraws a pending request. You can allow it by enabling the recall option on the process. Recall actions typically reset the status field to Draft or Recalled, so the record does not look pending. Salesforce unlocks the record after a recall.
Order matters
Actions at one point run in the order you list them. A later action can depend on an earlier one. For example, an email alert template that merges a status field should come after the field update that sets it.
Worked example
A discount approval process on Opportunity uses these actions.
| Action point | Action |
|---|---|
| Initial submission | Field update: `Approval_Status__c` = `Pending` |
| Final approval | Field update: `Approval_Status__c` = `Approved`, then email alert to owner |
| Final rejection | Field update: `Approval_Status__c` = `Rejected`, then email alert to owner |
| Recall | Field update: `Approval_Status__c` = `Draft` |
Without the initial submission update, users would see no status change until someone responds. Without the recall update, a withdrawn record would still read Pending.
Common errors
- A field update fails because of a validation rule. The whole action, and often the submission, fails with that error.
- An email alert never arrives because the template or recipient is missing, or the alert is attached to the wrong action point.
- Step-level actions are added when whole-process actions would do, so the same update is duplicated across steps.
Exercise
A record is recalled and still shows Approval_Status__c = Pending. Which action point is missing an action, and what should it do?
Show answer
The recall action point has no field update. Add one that sets Approval_Status__c to a non-pending value such as Draft, so the status matches the fact that no approval is open.
Exercise
Why should an email alert that merges Approval_Status__c be listed after the field update that sets it?
Show answer
Actions at an action point run in the order listed. If the alert runs first, the template merges the old status value instead of the new one.