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
Pronati DebnathPronati Debnath 

Line: 22, Column: 1 System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [First_Name__c, Last_Name__c]: [First_Name__c, Last_Name__c]

Line: 22, Column: 1
System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [First_Name__c, Last_Name__c]: [First_Name__c, Last_Name__c]
PriyaPriya (Salesforce Developers) 

Hi Pronati,

These type of error occured generraly occured when you try to create or updated the record without passing the required field value in it.

Based on the error message, First_Name__c, Last_Name__c are custom fields that are required to be populated.

So try to pass the value for field First name and Last name and then do any DML operation.

Check this similar example :- https://dfc-org-production.force.com/forums/?id=9062I000000DH28QAG

If you like the information, kindly mark it as the best answer.

Thanks & Regards,

Priya Ranjan

ravi soniravi soni

HI Pronati ,
the error is straightforword 
REQUIRED_FIELD_MISSING, Required fields are missing: [First_Name__c, Last_Name__c]: [First_Name__c, Last_Name__c]
when you are tring to insert a record then you must fill up all required fields.
E.g : 

Account acc = new Account ();
acc.Name = 'test 1';
acc.First_Name__c = 'My FirstName';//Required Field
acc.Last_Name__c= 'My LastName';////Required Field
insert acc;

like acc.First_Name__c = 'My FirstName';
      acc.Last_Name__c= 'My LastName';


like first name, last name you have to fill up all the required fields.

don't forget to mark it as the best answer.
Thank you