In this we will learn about Validation Rule with an example.It is  some criteria  which is defined to validate the data entered by user while creating or manipulating the records. This event fire right after clicking the save button. It can contain the formula or expression that validate the data and return ‘true’ or ‘false’. It can also return error message associated with that particular validation rule which will display to user when he enter invalid data.You can create validation rules for objects, fields, campaign members, or case milestones.

Steps:

Follow the step to create a validation rule for object.

  1. Goto SetUp>>Customize>>Account(Any Object).
  2. From left sidebar click validation rule.
  3. Click New.
  4. Enter the Name of the rule.
  5. In Error Condition Formula section define your criteria to validate the data.
  6. To check the formula or expression for error click on Check Syntax.
  7. In Error Message section define your message and position which will appear when user enter wrong data.
  8. Finally, Save it.

Example:

Now we are going to write validation rule for contact object which fires when contact is save. This rule validate whether contact’s age is more than 18 years or not. This will through error when contact’s age is less than 18.

  1. Goto SetUp>>Customize>>Contact.
  2. From left sidebar click validation rule.
  3. Click New.
  4. Enter the Name of the rule i.e. Verify_Age
  5. In Error Condition Formula section define your criteria to validate the data. i.e  Year( Birthdate) > 1999
  6. To check the formula or expression for error click on Check Syntax.
  7. In Error Message section define your message and position which will appear when user enter wrong data. i.e. Contact must be more than or equal to 18 years
  8. Finally, Save it.

Output

Support

That’s all for Validation Rule, still if you have any further query feel free to contact us, we will be happy to help you https://wedgecommerce.com/contact-us/.

Leave A Reply

Please verify that you are not a robot.

Tell us about Your Company

How can we help you with your business?




    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home