You need to sign in to do that
Don't have an account?
lodoss118
How do you mass update a record, without getting into governor limits?
I have a sales order object and want to update a field on all the records, but i keep getting errors about governor limits
can anyone give me a quick pseudo code on how to do it, thanks.
can anyone give me a quick pseudo code on how to do it, thanks.
what i did is create a list and selected all approved orders
salesList = new List<SCRB_SalesOrder__c>([select id, name, approved__c, estDate__c, approvedDate__c from SCRB_SalesOrder__c where approved__c = true]);
if(salesList.size() > 0) {
for(SCRB_SalesOrder__c s : salesList) {
if(s != null) {
s.estDate__c= approvedDate__c.addDays(2);
}
}
update salesList;
}
but i always get errors when trying to deploy to the live system, i.e.about governor limits