Custom Validations

Custom validations exist for key business process and tenant specific (however the BPs that support Custom Validations are common across all WD tenants). The purpose of a custom validation is to prevent the submission of a business process if certain conditions are met. For example, we can use custom validations to prevent the creation of invoices without a cost centre (without making cost centre a required field).

Custom Validations contain configurable condition rules which Workday evaluates when the "Submit" button is pressed (at the initiation step of the BP).

Custom Validations are tenant wide and contain two types of validation:

  1. Critical - If triggered, it will give a critical error and prevent the BP from initiating
  2. Warning - If triggered, it will give a Warning message and allow the BP / transaction to continue

 

Creating Custom Validation Tests

When testing Customer validations, we will create negative tests to ensure each validation is working as expected, should the BP initiate and complete (assuming we are focusing on critical validations) this would be a failure. By searching for Maintain Custom Validations in Workday, you can see all of the BPs that have custom validations and the specific rules applied to each one (see screenshot below)

The example of a Custom Validation below is saying that a critical warning should be thrown if this criteria is met:

  • If Company is in the list AND
  • Cost Center is empty AND
  • Ledger Account Type is either Expense OR Income

If this is triggered in Workday, an error message similar to the one below will be displayed.

So an example test in this case would be:

  1. Create a test for "Create Journal"
  2. Use "Global Modern Servies, Inc. (USA)" as the Company
  3. Choose a Ledger with account type "Expense"
  4. Leave the "Cost Center" blank