有人可以看看它。下面是代码和错误
global void execute(
Database.BatchableContext BC,
List<sObject> listObj){
list <Account> inAcc = new list<Account>();
for (sObject lo : listObj){
Unprocessed_Agreement__c temp = (Unprocessed_Agreement__c)lo;
inAcc.add(processor.processAccountRecord(temp));
}
insert(inAcc); // This line throws the error
}
处理器类看起来像这样
global class CreateAndModifyProcessor {
global Account processAccountRecord( Unprocessed_Agreement__c temp){
Account tempAcc = new Account();
tempAcc.Begining__c = temp.Begining__c;
tempAcc.Agreement_ID__c = temp.Agreement_ID__c;
return tempAcc;
}
}
第一个错误:插入失败。第 0 行的第一个异常;第一个错误:REQUIRED_FIELD_MISSING,缺少必填字段:[名称]:[名称]