You need to sign in to do that
Don't have an account?
raki
How to Save a record With out ValidationRule Fields on VF Page
I created a VF page With some inputfield components these fields don't have any validation rules but when i am trying to save the records after entering the details in it. I am getting an error MSG as
Insert failed. The first exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, You must review the preferences section before you can save this record.
There are some validation rules on other fields in the same object. According to my requirement I don't want these validation fields on my VF page for now.
Raki,
Validation rules gets executed on create/edit operations.
Validation rules gets invoked even though you are not using some fields(Fields which are causing validation errors) on VF page.
Hope this helps :)
Thanks,
Devendra
Thanks Devendra
but im getting error msg.
Raki,
Is there any validation rule which is causing a problem? Please check.
Thanks,
Devendra
yeah there are some validation rules in the object but im not using those fields
Raki,
Validation Rules-
Validation rules apply to new and updated records for an object, even if the fields referenced in the validation rule are not included in a page layout or an API call. Validation rules don't apply if you create new records for an object with Quick Create. If your organization has multiple page layouts for the object on which you create a validation rule, verify that the validation rule functions as intended on each layout. If your organization has any integrations that use this object, verify that the validation rule functions as intended for each integration.
Here doc explains about using Pagelayout. Similarly validation rules get applied on visual force page event though you have not added particular field on the page.
Hope this helps :)
Thanks,
Devendra
I've posted an answer to this on the stack exchange thread at:
http://salesforce.stackexchange.com/questions/5219/how-to-save-a-record-with-out-validationrule-fields-on-vf-page/5259#5259