function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anup KakdeAnup Kakde 

How to bypass validation rule without using custom setting?Is it possible using trigger?If yes plz provide me solution.n

Learn Salesforce 36Learn Salesforce 36
There are 2 ways to bypass without a custom setting:
  • To bypaas validation rule without custom setting, you can create a custom field(checkbox) on 'User' and you can check that field's value to bypass for particular users.
  • you can create a checkbox field on the Sobject and as per it's value, validation rule can be bypassed for particular records.
it's not possible via trigger because in execution cycle, validation rules are executed before the trigger executes.