You need to sign in to do that
Don't have an account?
Mustafa Top
How to send content of SF report with email using schedulable apex class?
getContent() method of PageReference is not working with schedulable class? Therefore I am not sending content of report with email.
I have tried with a trigger, is as follows:
1- A field be update when the schedulable class is triggered.
2- Update-Trigger works and calls a @future method that contains getContent method.
But this is not working. Attached report content can not be seen in the mail. Is there a work-around to this?
Hello,
As per design you can't use the getContent and getContentAsPDFPageReference methods in scheduled Apex or in asynchronous calls. There are couple of ideas posted on ideaexchange portal for having this functionality in future release, please vote them:
https://success.salesforce.com/ideaSearch?keywords=getcontent
Hello,
A workaround could be instead of getting the contents from reports write a query on the obejct on which report is running and write all the fields and filters similar to the report. I am afraid that this might hit the governor limits.
Unfortunately the report object does not contain similar of content, contentOfExcel, contentOfText fields.
=============================
Developer for www.voicent.com
Voicent provides CRM, auto dialer, predictive dialer, reminder, and call center solution that is suitable for anyone in any level
Voicent strives to meet customer demands to integrate Voicent software with CRM of their choice.