You need to sign in to do that
Don't have an account?
sandy sfdc
Skip Validation when creating record from apex class
Hi,
I need to skip validation rule when im creating record from apex class and also from web services.
for ex: validation rule like: AND(ISBLANK(Phone), and in my class im not giving phone field.Even i tried according to the following link http://bobbuzzard.blogspot.in/2011/11/bypass-validation-rules-from-apex.html,but we can't made changes in clients validation rules.
So,please can any one help on this.
I need to skip validation rule when im creating record from apex class and also from web services.
for ex: validation rule like: AND(ISBLANK(Phone), and in my class im not giving phone field.Even i tried according to the following link http://bobbuzzard.blogspot.in/2011/11/bypass-validation-rules-from-apex.html,but we can't made changes in clients validation rules.
So,please can any one help on this.
--- snip ---
4. Runs most system validation steps again, such as verifying that all required fields have a non-null value, and runs any user-defined validation rules. The only system validation that Salesforce doesn't run a second time (when the request comes from a standard UI edit page) is the enforcement of layout-specific rules.
--- snip ---
so there's no way in apex to set anything to skip the execution of these rules.