You need to sign in to do that
Don't have an account?
AnonTestQuest
Making two lists out of a scope of records
How would I go about making two separate lists of items in my scope in a batch that return different records based on criteria? I want to send out separate emails to each list.
All Answers
global void execute(Database.BatchableContext BC, List<sObject> scope){
}
You can send sObject list and identify the Object with Prefix of there id .. might be helful for you
1) any records that expire = Next_N_Days:2
&
2) any records that expire <= TODAY
Once I have those two lists I need to do a for if else statement that runs throug the lists and sends the approapriate email.