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
Manj_SFDCManj_SFDC
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
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm
Raj VakatiRaj Vakati
Refer this links 

https://salesforce.stackexchange.com/questions/196416/how-to-use-wrapper-class-in-batch-iterator-using-custom-iterator
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_batch_interface.htm