Defining Validation Guidelines in Salesforce


Validation Rule

With this publish, we’ll find out about Validation Rule, that are standards outlined to validate the knowledge entered by the person when creating or manipulating the information. This occasion happens after the save button has been clicked. This may include the method or expression that validates the knowledge and returns ‘true’ or ‘false’. It will probably additionally return an error message related to that exact validation rule in order that the person can see it when he enters invalid knowledge. A validation rule may be created for an object, a area, a campaign member, or a case milestone. 

Steps: 

Comply with the step to create a validation rule for the object. 

  1. Goto SetUp>>Customise>>Account(Any Object). 
  2. From the left sidebar click on the validation rule. 
  3. Click on New. 
  4. Enter the Identify of the rule. 
  5. Within the Error Situation Formulation part outline your standards to validate the information. 
  6. To examine the method or expression for error click on on Examine Syntax. 
  7. In Error Message part outline your message and place which can seem when the person enters the incorrect knowledge. 
  8. Lastly, Reserve it. 

dont miss out iconDo not forget to take a look at: Create Sharing Rules Unit in Salesforce – Learn Here

Instance: 

Now we’re going to write a validation rule for contact objects which fires when contact is saved. This rule validates whether or not a contact’s age is greater than 18 years or not. This can trigger an error when contact’s age is lower than 18. 

  1. Goto SetUp>>Customise>>Contact. 
  2. From the left sidebar click on the validation rule. 
  3. Click on New. 
  4. Enter the Identify of the rule i.e. Verify_Age 
  5. Within the Error Situation, Formulation part outline your standards to validate the information. i.e  12 months ( Birthdate) > 1999 
  6. To examine the method or expression for error click on on Examine Syntax. 
  7. Within the Error Message part outline your message and place which can seem when the person enters the incorrect knowledge. i.e. Contact have to be greater than or equal to 18 years 
  8. Lastly, Reserve it. 





Source link

Thanks for Reading

Enjoyed this post? Share it with your networks.

Leave a Feedback!