Skip to content

Validation Rules

emilymorse edited this page Jul 12, 2019 · 2 revisions

What is a Validation Rule?

Validation rules verify that data entered by users in records meet the standards you specify before they can save it. Validation rules can also be used to prevent users from editing records that meet certain criteria.

Sample Validation Rule

The Outbound Funds Package does not contain any validation rules out of the box. Below is an example validation rule that could be created to enhance user experience with this package:

  • If a Disbursement has a status of ‘Paid’, prevent the edit of the Disbursement record.

Building a Validation Rule

  1. From Salesforce click the Setup icon, then click Setup​.
  2. From Setup, click the Object Manager​ tab.
  3. Scroll to find the name of the object you are creating the validation rule on.
  4. Click Validation Rules.
  5. Click New.
  6. On the New Validation Rule screen, fill out the information as such:
    1. Rule Name: Name of the rule
    2. Active: Check this box to activate
    3. Description: Describe what the Rule will do
    4. Error Condition Formula: When this formula equals TRUE, the error is triggered for the user.
      1. Click on Check syntax to check your formula.
    5. Error Message: What will appear on page to user when error is triggered.
    6. Error Location: Either at the top of the page or by the field
    7. The page would look as follows: Image
    8. Click Save to Activate.

For more information on Validation Rules and how to create them, check out this Trailhead Trail.