+ Start a Discussion

How to skip the validation rules on selecting a checkbox


I have a page with checkbox included in it.When this checkbox is selected,it should run the validation rules and display the error messages accordingly.When this checkbox is not selected,it should skip the validation rules and the record should save without displaying errors.

How can i achieve this requirement using before triggers??

Your answers will be highly helpful.
Best Answer chosen by Prasanna_24
Yes you can do that, without code
Use if condition in your validation rule
E.g.: IF( NOT(skip_validation_checkbox) , (your validation rule) , false)

so the rule  looks if checkox is checked. if it is then returns false else its checks for the validation condition