You need to sign in to do that
Don't have an account?
lodoss118
Batc updating/insert massive records in apex?
Can anyone give an example how i would batch update loads of records in apex?
for example say i have a query that returns like 10k accounts and i want to update a field on all those accounts how would i update those accounts in apex code?
for example say i have a query that returns like 10k accounts and i want to update a field on all those accounts how would i update those accounts in apex code?
Well, according to the logic of your program, you can combine an scontrol + Apex webservice in order to update (max) 1000 records at once and from the scontrol manage the invocation of the WS until no more data be found.
I suggest to use an autonumeric field that will be useful to mark after every iteration which was the last updated record and then to start again from the next record.