Sub topic 3
Entry criteria and who can submit
This chapter covers the two gates that decide whether a record can enter an approval process: the entry criteria and the list of allowed submitters. It assumes you can navigate Setup, understand objects, fields and records, know profiles, roles and public groups, and can write a basic formula. The Apex section assumes basic Apex.
Two gates, checked at submission
An approval process doesn't act on every record of its object. A record enters only when both of these are true at the moment someone submits it:
- The record meets the process's entry criteria.
- The person submitting is an allowed submitter.
If either check fails, the process is skipped for that record. Nothing is evaluated again later. If a field changes after submission so that the record no longer meets the criteria, the pending request continues.
Entry criteria
Entry criteria are set on the first page of the process wizard. You choose one of three options.
| Option | What it does | Use it when |
|---|---|---|
| Criteria are met | Compares fields with operators such as equals or greater than. All conditions are combined with AND by default, and you can add filter logic. | The rule is simple and checks a few fields. |
| Formula evaluates to true | Evaluates a formula that returns true or false. | You need functions, cross-object fields, or OR logic. |
| No criteria (all records can enter) | Every record of the object qualifies. | The submitter list alone is enough to control entry. |
A formula example
Suppose discounts above 20% on an opportunity need approval, but only once the deal reaches negotiation. This formula expresses that rule:
AND(
Discount_Percent__c > 20,
ISPICKVAL(StageName, "Negotiation/Review")
)The same rule works with "Criteria are met" as two conditions. The formula form pays off when you need something the filter cannot express, such as:
AND(
NOT(ISBLANK(Discount_Percent__c)),
OR(Discount_Percent__c > 20, Amount > 100000),
Account.Type <> "Internal"
)Discount_Percent__c is a custom field assumed for this example. Replace it with your own field.
Gotchas with entry criteria
- Blank values. Comparisons against blank fields can behave differently from what you expect. A blank number is treated as zero in some formula contexts, so guard with
NOT(ISBLANK(...))when blank means "not applicable". - Picklists. In formulas, use
ISPICKVAL(field, "value"). Comparing a picklist with=is a syntax error. - Evaluated once. The criteria are checked at submission, not continuously. If you need to stop a change after approval, that is a job for record locking or validation rules, not entry criteria.
- Active processes are read-only. You can't edit the entry criteria of an active process. Deactivate it first, make the change, and reactivate it. Plan changes when no important requests are pending.
- What happens on a miss. A record that fails the criteria is not rejected. It simply never enters the process. The user sees an error when they try to submit it.
Use entry criteria to describe which records need approval, and use step criteria (next chapter) to decide how they are routed once inside.
Initial submitters
The Specify Initial Submitters section of the process definition lists who can submit a record to this process. You can add several kinds of submitters:
- Users
- Public groups
- Roles
- Roles and internal subordinates
- The record owner (listed as the object's Owner)
- The record creator (listed as the object's Creator)
Partner and portal users can be added as well, if those features are enabled in your org.
Two points about submitters are easy to miss:
- Being able to edit a record doesn't make you a submitter. A user with edit access who is not on the list will not see a working Submit for Approval button for that process, or will get an error when they try.
- The list controls who can start, not who can see. Approvers are chosen in the step definitions. Visibility of the record still follows your sharing model.
A practical pattern is to add the record owner plus a public group of sales operations users. The group lets an administrative user submit on behalf of a rep when the rep is unavailable.
Several processes on the same object
An object can have many active approval processes. When a user submits a record, Salesforce goes through the active processes in their process order and uses the first one where the record meets the entry criteria and the user is an allowed submitter. That means order matters in these cases:
- Overlapping criteria. A record that qualifies for two processes will enter whichever comes first.
- A general process and a specific one. Put the specific process (for example,
Amount > 500000) before the general one (Amount > 10000), or the specific one will never be used.
You can change the order from the approval process list for the object using the Manage Approval Processes page. Review it whenever you add a process.
Within a process, entry criteria also interact with step criteria. If you want a record to skip a step, use the step's own criteria. Changing the entry criteria only affects whether the record enters at all.
Making the button available
Meeting the gates isn't enough if the user has no way to submit. Check these items:
- Lightning Experience: add the Submit for Approval action to the page layout's Salesforce Mobile and Lightning Experience Actions section. Add the Approval History related list as well, so users can see the request status.
- Record already pending: a record that is already in an approval cannot be submitted again until the request is finished or recalled.
- Process inactive: inactive processes are never considered.
- Automation: Flow can submit records using the Submit for Approval action, and Apex can submit them using the API. Both use the same entry criteria and submitter checks.
Submitting from Apex and handling a miss
Apex follows the same gates. If no process fits, the call fails with a NO_APPLICABLE_PROCESS status. The following method shows how to submit on behalf of a specific user and check the outcome without throwing an exception.
public with sharing class ApprovalSubmitter {
public static String submit(Id recordId, Id submitterId) {
Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
req.setObjectId(recordId);
req.setSubmitterId(submitterId);
req.setComments('Submitted by automation.');
// allOrNone = false returns a result instead of throwing on failure.
Approval.ProcessResult result = Approval.process(req, false);
if (result.isSuccess()) {
return 'Submitted. Status: ' + result.getInstanceStatus();
}
List<String> messages = new List<String>();
for (Database.Error err : result.getErrors()) {
messages.add(err.getStatusCode() + ': ' + err.getMessage());
}
return 'Not submitted. ' + String.join(messages, '; ');
}
}The submitter you pass must be on the allowed submitter list of a process whose criteria the record meets. Otherwise the result is a failure. The request class also has setSkipEntryCriteria(true), which skips the entry criteria for a named process. Use it only when you have chosen the process with setProcessDefinitionNameOrId and have a real reason, because it bypasses the rule that the process was built to enforce.
Troubleshooting a submission that is rejected at the door
When a user reports that they can't submit a record, check in this order:
- Is the process active, and is it the one you expect?
- Does the record meet the criteria right now? Copy the formula into a test formula field, or compare the field values directly.
- Is the user in the allowed submitters list, directly or through a role or group?
- Is another process earlier in the order catching the record?
- Is the record already in a pending request?
- Is the Submit for Approval action on the user's layout?
Exercise
A sales rep owns an opportunity worth 150,000 with a discount of 25%. Two active processes exist on Opportunity. Process 1 ("General Discount") has entry criteria DiscountPercent_c > 20 and is first in order. Process 2 ("Large Deal") has entry criteria Amount > 100000 and is second. Both list the opportunity owner as a submitter. The rep submits the record. Which process is used, and how would you make the Large Deal process take priority?
Show answer
Process 1 is used, because processes are checked in order and the record meets its criteria and the rep is an allowed submitter, so Salesforce never reaches Process 2. To make Large Deal take priority, move it ahead of General Discount in the process order for Opportunity, or tighten the General Discount criteria so large deals don't qualify.
Exercise
A manager has edit access to a record and meets all entry criteria, but gets an error when submitting it. Name two likely causes related to this chapter.
Show answer
The manager is not on the allowed submitter list of any process whose criteria the record meets (edit access doesn't make someone a submitter), or the record is already in a pending approval. Other valid causes are an inactive process or an earlier process in the order that claims the record.