Thursday 26 June 2014

Create a report using apex class and send as an Email Attachment

/*
Create a customize report to send specific user via email, using apex class and scheduler in email attachment.

Suppose we have object Job__c and specific user need daily email how much Job everyday created my his team. (here I am defining very simple scenario but it is very useful for complex and complected report)

I am using here single object Job__c and 3 apex classes to meet this requirement.
also i try to cover following scenario

a batch Apex job that contains 20,000 records and is executed without the optional scope parameter is considered five transactions of 200 records each
*/