You need to sign in to do that
Don't have an account?
Ankit Agarwal 74
Mass update is not working in Batch process
Hi All,
I am trying to Update a field of Account in batch process, for single Account it is working fine but for multiple accounts it is not working. i am doing this in execute method. here is my code, please correct me where i am wrong:
List<Account> accountAll = new List<Account>();
if(ListOfAllAccountsID.size()> 0){
for (Account account :[SELECT id,Service_Flag__c FROM Account where Id = :ListOfAllAccountsID]) {
account.Service_Flag__c=true;
accountAll.add(account);
}
update accountAll;
}
before of this update operation, I am performing mass mail operation and thats working fine but when I go for update Account checkbox, mass update is not working
I am trying to Update a field of Account in batch process, for single Account it is working fine but for multiple accounts it is not working. i am doing this in execute method. here is my code, please correct me where i am wrong:
List<Account> accountAll = new List<Account>();
if(ListOfAllAccountsID.size()> 0){
for (Account account :[SELECT id,Service_Flag__c FROM Account where Id = :ListOfAllAccountsID]) {
account.Service_Flag__c=true;
accountAll.add(account);
}
update accountAll;
}
before of this update operation, I am performing mass mail operation and thats working fine but when I go for update Account checkbox, mass update is not working
Thanks