Newer Version Available

This content describes an older version of this product. View Latest

Try It Out: Create the “Send Rejection Letter” Workflow Rule

To make this rule entirely functional, we'll need to define both a workflow rule, which specifies the criteria for when the rule should be executed, and a workflow task that includes the “Send Rejection Letter” task template. Although we can define workflow components in any order, let's start with defining the workflow rule itself. It'll save us a couple of clicks a little later when we define the rule's associated workflow task.

  1. From Setup, click Create | Workflow & Approvals | Workflow Rules.
  2. If you see an introductory splash page, simply click Continue.
  3. Click New Rule.
The first thing we need to do is select the object that will be associated with our workflow rule. As we talked about earlier, every workflow rule must be associated with a single object to determine the fields that we can use to set criteria. Since we need to trigger this workflow rule when the Status field of a job application record is set to “Reject,” we need to select Job Application here.
  1. In the Object drop-down list, choose Job Application, and click Next.
Now it's time to set our workflow rule details.
  1. In the Rule Name text box, enter Send Rejection Letter.
  2. In the Description text box, enter Send a rejection letter when a hiring manager changes the status of a job application to Rejected.
Now use the Evaluation Criteria area to specify when this rule should be evaluated. The options are:
Evaluate the rule when a record is: Description
created Evaluate the rule criteria each time a record is created. If the rule criteria is met, run the rule. Ignore all updates to existing records.

With this option, the rule never runs more than once per record.

created, and every time it’s edited Evaluate the rule criteria each time a record is created or updated. If the rule criteria is met, run the rule.

With this option, the rule repeatedly runs every time a record is edited, as long as the record meets the rule criteria.

You can't add time-dependent actions to the rule if you select this option.

Note

created, and any time it’s edited to subsequently meet criteria (Default) Evaluate the rule criteria each time a record is created or updated.
  • For a new record, run the rule if the rule criteria is met.
  • For an updated record, run the rule only if the record is changed from not meeting the rule criteria to meeting the rule criteria.

With this option, the rule can run multiple times per record, but it won’t run when the record edits are unrelated to the rule criteria.

For example, suppose that for an opportunity record to meet the rule criteria, the opportunity probability must be greater than 50%. If you create an opportunity with a probability of 75%, the workflow rule runs. If you edit that opportunity by changing the probability to 25%, the edit doesn’t cause the rule to run. If you then edit that opportunity by changing the probability from 25% to 75%, the edit causes the rule to run. With this last edit, the rule runs because the record is changed from not meeting the rule criteria to meeting the rule criteria.

Since we don't want to assign duplicate tasks to a recruiter every time the record is saved, we'll keep the default option.

  1. Under “Evaluate the rule when a record is:,” select created, and any time it’s edited to subsequently meet criteria.

To finish up defining the rule, we need to specify the conditions that will trigger execution of the rule's associated actions. We can do this by defining a set of criteria that trigger the workflow rule when met, or we can create a formula that triggers the workflow rule if it evaluates to True. While creating a formula provides more flexibility, setting the criteria is easier. For this rule, we can achieve our objective by setting the criteria, so let's do that.

Every workflow rule requires at least one row of filter criteria, but we can set as many filters as we want using additional rows.

  1. In the first row of Rule Criteria filters:
    • Set the Field column to Job Application: Status.
    • Set the Operator column to equals.
    • Set the Value column to Rejected.
  2. Click Save & Next.
Creating a New Workflow Rule The Edit Rule - Send Rejection Letter page. Under Rule Criteria, the rule is set to run when the Status field equals Rejected.

At this point, we've just defined our “Send Rejection Letter” workflow rule. If we canceled out of the workflow wizard and, from Setup, clicked Create | Workflow & Approvals | Workflow Rules, we'd see it in the list view. However, because workflow rules aren't all that useful without an associated action, the workflow wizard takes us directly to a screen where we can define the “Send Rejection Letter” workflow task. Let's work through that now.