function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ledap13ledap13 

class or batch job

I want a cyclic evaluation of my custom object order to the price, tax, etc.
For this I need to query some 10000 records and calculate.
Which way is better? Creating a class or batch job?
Is there a bestpractice?
Vinita_SFDCVinita_SFDC
Hello,

If you are just querying and not making an y delete/insert/update on 10000 records in one go then you can go for apex class, no batch required.

Please read following thread for a better understanding:

http://salesforce.stackexchange.com/questions/920/why-use-batch-apex
ledap13ledap13
OK.
I want out of 10000 records add up some fields and create a total invoice per account.
Is it a problem if there are 100000 and more records?