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
Saniya Khan 2Saniya Khan 2 

how to pass wrapper class in batch class

I have wrapper class which I want to pass to batch class as want to send 1000's of email and also want to update records
Hi Saniya
you can create a list of your custom wrapper class in the execute method, 
List<AccountCustomIterator.AccountWrapper> accWrapper = (List<AccountCustomIterator.AccountWrapper>)scope;
You then want to use the created wrapper list in the finish method of Batch Apex.
Please refer
Raj VakatiRaj Vakati
Refer this links