In the Expression Builder window, you can use the sample expressions in the following table.
|
|
Expression Builder Sample Expressions
|
Update the field Opportunity Margin
|
Description
|
Update the field Opportunity Margin
|
Syntax
|
[<OpportunityMargin>] = [<OpportunityRevenue>]-[<OpportunityCost>]
|
Validate small deals
|
Description
|
Field Validation. 'Small Deal' cannot have revenue greater than 1,000,000
|
Syntax
|
<= IIf (FieldValue('<OpportunityCategory>') = 'Small Deal', 1000000, [<Revenue>])
|
Assign a newly-created Service Request to the creator
|
Description
|
Whenever a Service Request is created, set LoginId( ) as the default for the Service Request field 'Owned By Id'.
|
Syntax
|
[<OwnerId>] = LoginId()
|
Check if the values of specified fields have changed
|
Description
|
Check for changes in field values
|
Syntax
|
(PRE('<ActualCost>') <> [<ActualCost>]) OR (PRE('<BudgetedCost>') <> [<BudgetedCost>])
|
Trigger a workflow based on a close date
|
Description
|
If the close date is modified by more than a month, execute the workflow.
|
Syntax
|
([<CloseDate>] - PRE('<CloseDate>')) > 30
|
Trigger a workflow if an opportunity reaches a certain stage without a contact
|
Description
|
If an opportunity reaches the Closed/Won sales stage without having a contact, execute the workflow.
|
Syntax
|
FieldValue('<SalesStage>') = "Closed/Won" AND PRE('<SalesStage>') <> [<SalesStage>] AND [<KeyContactId>] = "No Match Row Id"
|
Trigger a workflow when a check box is selected
|
Description
|
If the custom Ready for Review check box field is selected, execute the workflow.
|
Syntax
|
FieldValue('<bReady_for_Review_ITAG>') = 'Y' AND (PRE('<bReady_for_Review_ITAG>') = 'N' OR IfNull(bReady_for_Review_ITAG, 'Y') = 'Y' )
|
Trigger an email when Activity workflow is created by someone other than the owner
|
Description
|
Trigger an email to the activity owner when an Activity workflow is created by someone other than the owner
|
Syntax
|
[<OwnerId>]<>LoginId()
|
Trigger an email when Account type is changed
|
Description
|
Trigger an email when Account type is changed from "Prospect" to "Customer"
|
Syntax
|
PRE('<AccountType>') = "Prospect" AND FieldValue('<AccountType>') = "Customer"
|
Exclude a specific channel from a workflow
|
Description
|
Do not execute a workflow for an online record
|
Syntax
|
PRE('<CampaignType>') = "Advertisement" AND ExcludeChannel("Online")
|