Adding a validation rule and message to a field

Note

Sage People has two different types of objectives for performance management processes: Objectives and Enhanced Objectives. If you are not sure which objectives your organization uses, check out this comparison.

Role: HR Administrator

You can add field validation rules for fields of the Enhanced Objective object and specify an error message to display if the validation fails when an Objective is saved

To add a validation rule:

  1. Go to the Enhanced Objective object:
    • In Salesforce Lightning Experience, go to Setup > Object Manager, and select the Enhanced Objective object
    • In Salesforce Classic interface, go to Setup > App SetupCreate > Objects, and select the Enhanced Objective object.
  2. Go to Validation Rules and select New:
    • In Salesforce Lightning Experience, select Validation Rules, and then select New.
    • In Salesforce Classic interface, scroll to the Validation Rules section, and select New.
  3. On the Validation Rule Edit page, complete the details as follows:

    Field What to enter
    Rule Name

    Enter a name for the rule. For example:

    Description Length

    Active

    Checkbox.

    Defaults to checked, do not uncheck.

    Description

    Optionally enter a description of the rule. For example:

    Displays an error if the content of the Description field is 20 characters or less.

  4. Complete the details in the Error Condition Formula section as follows:

    Field Description
    Error Condition Formula

    Enter the details of the rule you want to apply to the field. Refer to the Salesforce documentation for information on the syntax and operations you want to use.

    For example:

    LEN( spperfmgmt__Description__c ) <= 20

  5. Complete the details in the Error Message section as follows:

    Field Description
    Error Message

    Enter an error message to display when the condition in the Error Condition Formula section evaluates to True.

    For example: 

    Description is too short! Add more detail about your Objective.

    Error Location

    Select the location where the error message is shown in the HR Manager portal.

    Does not apply to Performance Management: the error message is always shown at the top of the page.

  6. Select Save.