This is a Step-by-Step Tutorial on how to configure Salesforce workflow. To learn more about what workflow can do, see this Overview of Salesforce Workflow.
To help explain what workflow does, I’m going to use the “When, Why, What” approach. To get started, you’ll need to go to Setup > App Setup > Create > Workflow & Approvals > Workflow Rules
From this screen, click the “New Rule” button
Next you’ll select what object you want Workflow to evaluate. You can have it evaluate native and custom objects. Once you’ve made your selection, click next.
WHEN is the record evaluated?
On this page you give your Rule a name and description. This screen of the wizard seems to trip up a lot of Administrators. The way Salesforce presents the options is a bit cryptic, so let me see if I can simplify the options.
In the ”Evaluation Rules” section of the page, Salesforce is asking you to set theEvaluation Criteria for WHEN you want the record to be evaluated (upon creation, or edit, or both). In the same order as the screen shot above, I’ve rephrased the options to hopefully be more clear:
- Evaluate the record when it is created or edited, and if the Rule Criteria below is true, fire one time
- Evaluate the record when it is created, and if the Rule Criteria below is true, fire one time
- Evaluate the record when it is created or edited, and if the Rule Criteria below is true, fire every time the record is updated until the Rule Criteria no longer is true
WHY does it fire?
In the section above we told Salesforce when to evaluate the record, now we need to tell it why to fire (or trigger an action). The “Why” is that it meets the Rule Criteria you specify. To set the Rule Criteria you can use Field value logic or a Formula. This example uses field value logic:
This example uses a formula. If the formula evaluates to be true, the rule will fire
NOTE: ISCHANGED and PRIORVALUE functions can be used in workflow if the trigger type is set to “Every time a record is created or edited.”
Once you are done setting up the Rule Criteria, click “Save and Next”
In the next section, let’s look at setting “WHAT” needs to fire by configuring Workflow Actions.
For more on this subject, see our ShellBlack Whiteboard episode: Workflow Rules Part 1 – Overview, Evaluation and Rule Criteria