+ Start a Discussion
santhosh  konsanthosh kon 

How to skip validation rules when trigger is being executing?

Best Answer chosen by santhosh kon
pbattissonpbattisson
Hi Santosh

There are multiple ways to do this. My personal choice is to add an additional checkbox field on the object in question that helps enable or disable the validation rule. You can then set this to true when working in a trigger to bypass the validation rule. You can then have a workflow rule fire to remove the flag after processing.

The great Bob Buzzard has a detailed walkthrough of how to do this on his blog (http://bobbuzzard.blogspot.co.uk/2011/11/bypass-validation-rules-from-apex.html) which is where I would recommend you going to get started.