I need help to do a DML operation with external id field. I am using the below syntax, but it is throwing an error
Schema.SObjectField f = PricebookEntry.Fields.Product_Code__c;
Database.UpsertResult[] myResult = Database.upsert(insertList,f,false);
Error: getErrors=(Database.Error[getFields=();getMessage=Product_Code__c not specified;getStatusCode=MISSING_ARGUMENT;]);getId=null
Any help here is greatly appreciated. Thanks.