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
Rakesh ERakesh E 

Upsert failed. First exception on row 0 first error: MISSING_ARGUMENT, DossierToSFID__c

Hi,

 

i amfaing this error when i try to do an UPSERT call.

 

ny external ID field is "DossierToSFID__c "

 

i am using upsert as below

 

   upsert recordList DossierToSFID__c ;

 

and i am getting the above error . please let me know if anyone faced this problem earlier.

i am stuck with my work due to this.

 

thank in advance

 

Regards,

Rakesh

bob_buzzardbob_buzzard
You can't just use the name like this - I think you'll need the Schema describe result for the field.

Assuming your sobject type is MyObject, it would be something like:


Schema.SObjectField f ieldDesc= MyObject__c.Fields.DossierToSFID__c;
upsert recordList fieldDesc;
Rakesh ERakesh E

Thank you for response. but it is not working and giving error " field not found fieldDesc"

 

please let me know whether it is a problem of data. say will it give error if the field value is null in the records that already exist in the databse.

 

Regards,

Rakesh

 

 

bob_buzzardbob_buzzard

Can you post your latest code?