• Keith Walker
  • NEWBIE
  • -1 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 0
    Questions
  • 4
    Replies
I need to have a schedule report exported to excel and put it into a schedule and  send it to specific e-mails.
I have already the report created.

I have used the following code:

global class Exporter implements System.Schedulable {
    global void execute(SchedulableContext sc) {
        ApexPages.PageReference report = new ApexPages.PageReference('/00O58000003m3Sa?csv=1');
        Messaging.EmailFileAttachment attachment = new Messaging.EmailFileAttachment();
        attachment.setFileName('report.xls');
        attachment.setBody(report.getContent());
        attachment.setContentType('text/csv');
        Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
        message.setFileAttachments(new Messaging.EmailFileAttachment[] { attachment } );
        message.setSubject('Report');
        message.setPlainTextBody('The report is attached.');
        message.setToAddresses( new String[] { 'mplampla.com' } );
        Messaging.sendEmail( new Messaging.SingleEmailMessage[] { message } );
        
    }
 }

although I don't see how i give this a schedule.
I guess that this reads the schedule that exists in the report and so the report is sent thourgh this code as an attachment in an email?
Can I also store the executable attachment directly to a path?

I like to place my Report on FTP folder automatically on weekly basis and my report wont exceed 10 MB size, i tried dataloader:io but it didnt help me to schedule on weekly basis, in dataloader i can schedule daily only for free version.My requirement is to place only one report otherwise i go for paid version.
Please suggest me if you have any free tool and some feasible solution.
thanks
soma
Can any one help me how to Transfer files to FTP from Salesforce Attachment object.
 
Hi ,

I'm new to integration . Have referred Salesforce documents but didnt understood much . I do not know where to start , I have a requirement to integrate Salesforce with Amazon S3 . So if anyone can help me with the sample code will be very useful . 

Also nice blogs ,useful links for integrations if given would be great.


Thanks,
Marc.

 

hi

i have installed SQL Server 2005  and visual web developer express 2005 .i want to get data from SQL say one table account-accountname and address  into salesforce.How we can connect sqL server to salesforce.Is it possible.Give me  a solution asap

  • January 28, 2011
  • Like
  • 2