You need to sign in to do that
Don't have an account?
Mangesh Honale 1
Is EmailMessage object query call not supported in batch apex?
I am working with EmailMessage object. I have a batch apex and in execute method I need to query EmailMessage records. But query does not return any records. When I put the same query in a normal class (not batch apex class) it gives results. Here is execute method implementation:
public void execute(Database.BatchableContext BC, List < string > reportRowsList){
//some code
List<EmailMessage> eMsgList = [Select Id, ToAddress from EmailMessage];
system.debug('Size: ' + eMsgList.size());
//some code again
}
What is going wrong?