I am trying to update the Description for over 200 Account entities by matching on Salesforce Id. I am using the following trigger ,
Trigger MyNew_tr_U on Account (after update) {
set<ID> ids = Trigger.newMap.keyset();
for(ID id : ids)
{
newChangeTable__c ch = new newChangeTable__c();
ch.Status__c = 'update';
ch.Url__c = id;
ch.Process__c = false;
insert ch;
}
}
but when i do the data Import of the csv file i get the following error:
CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY:MyNew_tr_U: execution of AfterUpdate
caused by: System.DmlException: Insert failed. First exception on row 0; first error:
STORAGE_LIMIT_EXCEEDED, storage limit exceeded: []
How can i get the trigger to work ?
Further to @eyescream answer below. What if I have no filter as in Name, that gives the same error.
Trigger MyNew_tr_U on Account (after update) { List<newChangeTable__c> toInsert = new List<newChangeTable__c>();
for(Account a : trigger.new){
Account old = trigger.oldMap.get(a.Id);
toInsert.add(new newChangeTable__c(
Status__c = 'update',
Url__c = a.Id,
Process__c = false
));
}
insert toInsert;
}