You need to sign in to do that
Don't have an account?
Chad Ritchie
Adding Wait/Pause/Delay Clause to Apex Code?
Hi Developer Community!
I wrote this code in the Execute Anonymous Window, essentially it finds the first record where Trigger__c is false, and makes it True.
Thanks!!
I wrote this code in the Execute Anonymous Window, essentially it finds the first record where Trigger__c is false, and makes it True.
List<Rep_Codes__c> replist = [SELECT Id, Trigger__c FROM Rep_Codes__c Where Trigger__c = False LIMIT 1]; for(Rep_Codes__c rep :replist){ rep.Trigger__c = True; } update repList;I need to make this update for a few hundred records, but the process that's being fired will blow up when it's run on more than a few records at a time.. And unfortunately our DataLoader isn't working right now.. so I'd like to figure out a way to have this code run and once it's finished it finds the next record, or something along those lines. Is this possible in an anonymous window? Not looking to have to write a test class or anything..
Thanks!!
You can make a batch class to update the fields
Please mark it as Best Answer if it helps you.
Thanks & Regards
Suraj Tripathi
.