You need to sign in to do that
Don't have an account?

Bypassing validation rules
Hi,
I have a bunch of validation rules on the account object> have avisual force page that saves some changes into the account Object. In sthis special case I do not want the validation rules to fire.
I tried implementing this by
1) checking a custom check box from the Apex code before making the special update from the controller.
2) unchecking the check box after i have made my special update;
I look for this flag in my validation rule to skip that rule if it is checked.
But ths does not seeme to work as it seems like there are some commit issues. I am unable to by pass the validation rule. Any ideas on how to solve this?
thanks,
Odie
In VisualForce, check the "immediate" attribute to bypass validation rules. Taken from the doc :
<attribute immediate>
A Boolean value that specifies whether the action associated withthis component should happen immediately, without processing
any validation rules associated with the fields on the page. If set to
true, the action happens immediately and validation rules are
skipped. If not specified, this value defaults to false.
<>
I've seen that a dozen times and never fully grasped that. See, we all learn something new every day.
if my trigger updates this value not a vf page, then how am I supposed to skip validation rules. Is there any immediate attribute in apex code?