You need to sign in to do that
Don't have an account?
Its urgent ! How to write Batch apex class of this code ?
Public class AccountSelectClassController3{ public List<wrapLead> wrapLeadList {get; set;} public List<Lead> selectedContacts{get;set;} Public String selectId {get;set;} public AccountSelectClassController3(){ body = apexpages.currentpage().getparameters().get('att'); if(wrapLeadList == null) { wrapLeadList= new List<wrapLead>(); for(Lead a: [SELECT Name,FirstName,LastName,Email,Title,Company FROM Lead ORDER by Name ASC]) { // As each Account is processed we create a new wrapAccount object and add it to the wrapAccountList wrapLeadList.add(new wrapLead(a)); } } normalList = true; selectedList = false; body = ''; //conId = ApexPages.currentPage().getParameters().get('Id'); //EmailCon =[Select email from lead where Id=:conId ].email; //to = EmailCon ; } public void processSelected() { AddRecep = ''; selectedContacts = new List<Lead>(); for(wrapLead wrapLeadObj : wrapLeadList) { if(wrapLeadObj.selected == true) { selectedContacts.add(wrapLeadObj.acc); if (AddRecep == '') { AddRecep = wrapLeadObj.acc.Email; } else { AddRecep += ';' + wrapLeadObj.acc.Email ; } } } } public class wrapLead { public Lead acc {get; set;} public Boolean selected {get; set;} public wrapLead (Lead a) { acc = a; selected = false; } } }
Can you please let us know what exactly you want to accomplish in batch apex?
Thanks,
Pankaj
I want to display records more then 50000 recods .
I don't this there is a way to pass values from batch class to vf controller. You need to put some filter in SOQL to limit the records retrieved.
How can we write batch Apex of this given code.
this code showning an Error!!!!
System.LimitException: Too many Email Invocations: 1
Please go through this code...
Thanks,
Regards,
Badrul Hassan