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

Avoid Validation Rules within a Trigger?

Is it possible to make a trigger run so that it bypasses validation rules?


In a way yes. Setting flag via the trigger that tells the validation rule to not run....Then you can have a workflow that if flag is set, uncheck it.

Anup JadhavAnup Jadhav

It is not directly possible, and is not recommended to bypass any validation rules. You should instead put a clause in the validation rule that if it runs under a certain user profile or Id then don't do anything.


When the trigger is run under a particular user profile or Id, the validation rule won't perform any action.


Hope this makes sense!


- Anup