Validation Rule Action
Last updated
Last updated
Validation Rule Action allows apply complex validation rules. User can configure rules and when they are met system fill through exception message.
If the rule is a part of the Action Group and Validation fails - other actions in the group will not be executed.
Add an action with the type Validation Rule.
Enter "Error message". This text will be shown to the user if conditions entered are true.
Enter rules for Validation rule to fire. Select the type: Query, Formula or Apex Call. See example below.
Each type allows to specify rules in specific way: see more details on Working with Conditions and Working with Actions articles.
Save the Action. Now you can call it from Kanban and other arias.
Working with Call Apex
Select Call Apex validation rule type.
Select the Class Name in the drop-down. If you don't see your class in the drop-down, use Filter option.
Enter Parameters in a JSON format.
Your custom Apex Class should implement FLX_KB.KanBanInterfaces.ApiInterface interface.
Note: In Global Action pass required "methodName" and "parameters" params to custom apex when using FLX_KB.KanBanInterfaces.ApiInterface.
For validation rule with Call Apex type "methodName" parameter should be set to "Rule".
Below is an example of an apex class that is used to execute apex rule.
Call method should return boolean. If call method returns 'true' conditions will not be met and rule will throw error, further actions won't be executed in case action is a part of Global Actions Group.
With the above setup rule will throw error when Account Prone is blank.