Canceling Workflow Save Operations
For certain record types, on workflow rules where the trigger is Before Modified Record Saved, you can specify that the operation to save the changes that triggered the rule is to be canceled if the condition on the rule is not met. However, changes made by Oracle CRM On Demand are not canceled even if you specify that the save operation is to be canceled.
The Cancel Save option is available only on workflow rules where the trigger event is Before Modified Record Saved, and it is available for certain record types only. In addition, your user role determines which record types the Cancel Save option is available on, as follows:
- If your user role has the Manage Data Rules - Manage Workflow Rules privilege, the Cancel Save option is available on workflow rules for the Opportunity record type.
- If your user role has the Workflow Cancel Save privilege as well as the Manage Data Rules - Manage Workflow Rules privilege, the Cancel Save option is available on workflow rules for the following record types:
- Custom Object 01
- Custom Object 02
- Custom Objects 04 and higher
- Service Request
To cancel a workflow save operation if the rule condition is not met
- In the Workflow Rule Detail page, in the Actions If Condition Is False section of the page, select the Cancel Save check box.
- (Optional) Specify the error message that is to be displayed when the save operation is canceled because the rule condition is not met.
- Save your changes.
The following table describes the options in the Actions If Condition Is False section of the Workflow Rule Detail page.
If you select this check box, the following actions are performed if the rule condition is not met:
- The workflow rule terminates.
- All subsequent workflow rules based on the same record type that have the Before Modified Record Saved trigger event also terminate.
- All previous changes to the state of the record, except changes made by Oracle CRM On Demand, are rolled back.
- The record returns to its original state. However, if Oracle CRM On Demand makes an update to the record, then the change overrides the Cancel Save action. For example, if the primary contact is removed from the related contacts, then Oracle CRM On Demand updates the primary contact information on the parent opportunity record. This update by Oracle CRM On Demand overrides any Cancel Save action on the opportunity record.
- Any subsequent workflow rules for the same record type that have the When Modified Record Saved trigger event are not triggered.
- A message is returned as follows:
- If the rule is triggered by a user action, then a message is displayed to the user whose action triggered the rule.
- If the rule is invoked by a Web service, then a message is returned to the Web service as an error string.
You can specify the message in the Display Message field.
If this check box is deselected, then the save operation is not affected (and no message is returned) if the condition on the rule is not met.
By default, the Cancel Save check box is deselected.
In this field, you can specify the message that is returned to the user or Web service if the condition on the rule is not met, and the Cancel Save check box is selected for the rule.
If you do not specify a message in this field, then a default message is returned. The maximum number of characters that the message can contain is 1999.
See the following topics for related workflow information: