Entity validation rules

Prerequisite: To configure entity validation rules, you must have the CONFIGADM access code.

Entity validation rules define custom rules and limitations for updating a WorkZone entity (a case, a contact, a document, or a custom type). Using entity validation rules, you can disable or restrict the possibility of updating an entity, until specific criteria are met. For example, you can disable the possibility to close cases that contain any non-archived documents, or to make it mandatory for all documents to have a letter date. See Example: below for a more detailed overview.

Entity validation rules, along with the validation triggers, are defined in the entity validation rulesets.

  • An entity validation ruleset: a set of validation triggers and validation rules for an entity.
  • A ruleset (validation) trigger: a set of conditions that define when to check the validation rule.
  • A validation rule: an OData filter query that defines custom requirements or limitations for an entity update.

Entity validation rulesets will apply to the singular entity edits and the mass-editing of multiple entities at once. You can create entity validation rulesets for any kind of entity updates, and combine multiple rules and triggers, as long as they do not contradict each other. Additionally, you can:

  • Define whether the users will be able to continue with updating the entity, if its validation rule results in an error.
  • Provide custom messages for each validation rule (and localize these messages into your supported languages).

Create an entity validation ruleset

  1. On the start page, click Client.
  2. Select the Entity validation rules tab.
  3. From the droplist at the top, select the entity type for which you want to define validation rules.
  4. Click Create. The Create entity validation ruleset dialog opens.
  5. Fill in the following fields:

    • Ruleset label: Provide unique name for this validation ruleset.
    • Ruleset trigger: Click + Add trigger to define an update event for running this validation ruleset (that is, a set of conditions that define when to check the validation rule).
      • From the droplist, select Entity property (this droplist is generated based on your entity type selection from step 3).
      • From the droplist, select Condition to apply (Equals, Does not equal, Greater than, Greater or equal, Less than, Less or equal, Contains, Starts with, and Ends with).
      • Value: Enter the needed value (supported variables: @Me, @Unit@Authority, @Day, @Week, @Month, @Quarter, @Year).
        Tip: For the @Day value you can use numeric modifiers with + and -. For example: @Day+1 (tomorrow), @Day-1 (yesterday), @Day+2m (two months in the future), @Day-3y (three years in the past), and so on.
    • Validation rules: Click + Add rule to add one or more validation rules for this ruleset.
      • Rule template: Enter the validation rule in form of an OData filter query with your custom requirements or limitations for an entity update. For example: Files('${Context.ID}')/FileRecords/$count?$filter=State_Value ne 'ARK'. See Querying data with OData for more information about OData queries.
      • From the droplist, select Condition to apply (Equals, Does not equal, Greater than, Greater or equal, Less than, Less or equal, Contains, Starts with, and Ends with).
      • Value: Enter the needed value (supported variables: @Me, @Unit@Authority, @Day, @Week, @Month, @Quarter, @Year).
        Tip: For the @Day value you can use numeric modifiers with + and -. For example: @Day+1 (tomorrow), @Day-1 (yesterday), @Day+2m (two months in the future), @Day-3y (three years in the past), and so on.
      • Continue on error: Enable this option to allow users update the entity, even if the validation rule results in an error.
      • Localized rule message: Enter an error message to show the users, if this validation rule results in an error. Expand to enter the localized messages for your supported languages.
    • Optionally, select Start date and End date for this ruleset.
  6. Click Create.

Edit a validation ruleset

  1. Select a validation ruleset that you want to edit.
  2. Click Edit.
  3. Apply the required changes in the Entity validation ruleset dialog.
  4. Click Save.

Delete a validation ruleset

  1. Select a validation ruleset that you want to delete.
  2. Click Delete, and then click Delete.