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
cvanpcvanp 

Error On Update , Required field Missing

Hi i have problem in updating Contract object, i am getting the error "required fields are missing". Please help. Here is my code looks like.
I need to update the sync_c field to "Y" after i download the Contract.

qrCont = binding.query("select Id,AccountId,BillingStreet,BillingCity,BillingState,"

+"ShippingPostalCode,sync__c from Contract where StatusCode='Activated' "

+"and sync__c!='Y'");

for (int i = 0; i <qrCont.records.Length; i++)//

{

Contract contract = (Contract)qrCont.records[i];

//set synch status to "Y"

contract.sync__c="Y";

}

SaveResult[] sr = binding.update(qrCont.records);

for(int i=0;i<sr.Length;i++)

{

if(!sr[i].success)

MessageBox.Show("ERROR Updating Contract"+sr[i].errors[0].message);

}

// here i am getting error as

Required Fields

Classrooms__c,Kit_Arrival_Date__c,Order_Submit_Date__c,Order_Delivery_Date__c Missing.

Please help.