Creating Expressions
Approval process expressions provide a method for qualifying whether an object record should be routed through specific approval steps.
To connect individual expressions together using OR and AND, you must use the advanced options. For details, see Creating Advanced Options.
There are three types of expression: standard, advanced and bound.
Expression |
Description |
---|---|
Standard |
This uses a field from an approval process's object record and an operator to compare to a single value to determine if a process can enter a certain approval step. The value can be a constant, entered manually or selected from a picklist, depending on the field type. |
Advanced |
This builds on a simple expression by enabling the value to come from a custom value expression. The custom value is derived from building another equation using a custom field in a custom table. |
Bound |
The same as advanced, except that the filter expression can use a field from the business object record in the approval process. |
Your criteria can contain a simple field, operator, and value, or the value can be composed of a custom expression evaluated at runtime that includes resolving a value from a custom table, a custom field in that table, and an optional filter expression to narrow the rows down in that table. Custom filter expressions can also use bind variables that substitute the value of a field from the context object at runtime.
Bound Expression
A |
The field comes from the business object associated with the approval process. Along with the operator, this forms the typical first two thirds of an equation. |
B |
Selecting Custom enables the Custom Value Expression section for creating advanced and bound expressions. It also sets Value to a read-only "NA". |
C |
Object is a custom Salesforce object containing the available fields. The value selected for Field is compared to the field in part A. These two fields and the operator form the expression in its most basic form. The expression is evaluated for each row in the custom object. |
D |
You can use Filter Expression to limit the number of rows in the custom object that are used as part of the overall expression. Any field in the custom object can be used to create a filter expression independent of the overall expression being evaluated. |
E |
Selecting Bind Value? creates a bound expression and makes the second field in Filter Expression come from the same business object as Field in part A. The Bind Value? check box identifies:
|
For both Custom Value Expression and Filter Expression, the data types for the values in the compared fields must match. If they do not match, an error occurs when you preview the process or submit a request.
To create standard expressions
To create advanced and bound expressions
Creating Advanced Options
By default, when you create expressions each of them is associated by AND. This means the criteria for each expression must be met before the approval process will be routed according to the entry criteria , approval step criteria, or term exception approval conditions.
The AND column is read-only and cannot be changed. Select Advanced Options.
Selecting Advanced Options removes the AND column, prepends a number to each expression, and displays the Advanced Filter Condition field. It displays each of the expressions, identified by their number, joined by the default AND.
In the Advanced Filter Condition field, you can use any combination of numbers representing the expressions with AND, OR, or parentheses. These are the only values that can be used. Other values may cause unexpected behavior.
There is no character validation in this free text field. You can use up to 255 characters.
To set advanced options
Initiating an Approval Request
If the object for which you have defined the approval process fulfills the search entry criteria and the step entry defined in the approval process, an approval request is initiated. All line items that require an approval show up with an "approval required" label. To view the object and line items that require an approval, use the Approval button on the object, to view a list of approvals required along with the approvers.