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
VempallyVempally 

How to bypass validations

Hi Everyone...

Iam trying to update few fields of a record which are not mandatory fields...

there are some required fields in the record....

when I click on "update" button from vf...the following error arises...

System.DmlException: Update failed. First exception on row 0 with id a0O9000000FiK6pEAF; first error: REQUIRED_FIELD_MISSING, Required fields are missing
Best Answer chosen by Vempally
RishavRishav
According to error you have some mandatory field , but if you have not implemented any mandatory field yet there is one by default mandatory field and 
that is "name" so checkout that.

All Answers

Avidev9Avidev9
You cannot fool the system, you have to mark the fields not required from the field level and probably move the permission to layouts. In this way they will be required in the standard layouts will be not required from the API / Code
RishavRishav
According to error you have some mandatory field , but if you have not implemented any mandatory field yet there is one by default mandatory field and 
that is "name" so checkout that.
This was selected as the best answer