You add actions to the Action page of a rule and the Actions page of a wizard. Rule actions specify what occurs if the rules meet the conditions in rule qualifiers. Wizard actions specify the actions for each wizard page. Unlike automated qualifiers that must return a boolean value, actions do NOT return values.
Automated actions files for both rules and wizards must be uploaded to the Automated Actions folder in the appropriate object definition. For more details, see Uploading Rule Component Files.
Rule actions execute when qualifiers return true. With automated rule actions, you can create new records and compare, calculate, and insert values. You use automated actions for custom and scheduled action rules.
For example, a rule may require that if a contact name changes, a history record for the contact saves with the date when the name changed and the ID of the user who made the change. For rule action samples in Java, see Rule Actions.
You do not create automated actions in the following situations:
•To deny the operation that triggers a rule.
•To approve the operation that triggers a rule and its route.
•To define actions with a template, such as populating fields with defined values.
Wizard actions execute when the user clicks next on the wizard page with the action, moving the wizard to the next page. Like rule actions, automated wizard actions create new records and compare, calculate, and insert values.
For example, in a wizard, you may want to assign a value to a custom field of the object. Or, instead of assigning values you may want to calculate values, display additional entry fields, overwrite values in the associated templates, validate the entered data, or create a new record. For examples of wizard page actions in Java, see Wizard Page Actions.
When writing automated page actions, make sure they will not duplicate custom action rules with the Create trigger. Custom action rules execute when the wizard finishes and the rule qualifiers are met.
You do not need to create automated actions in wizards when you need to assign a value to a system field of the main object, its sub-objects, and related objects.
Important: In wizards, do not confuse page actions with rule actions in page transition rules because you cannot automate actions in page transition rules.