Skip to main content

I have some very rear request from business to build and automate a report via apex code. Is this possible in salesforce or if yes then how please help me out.

3 respuestas
  1. 19 ene, 12:06

    @Junaid Liaquat if Apex is your a key part of your requirement - this is possible - but keep in mind in each case Apex limits - likely for some report calcs its not just rows but CPU - as always it depends on your report size and scope. Meanwhile some options to explore, 1/ Apex calling the Reports Apex API (good to reuse existing report def but render it as you see fit, LWC/VF), 2/ Apex performing SOQL and outputing HTML you pass to Blob.toPDF, 3/ Apex working with VF page as template for report and calling PageReference.getContent() (this also works with VF PDF rendering mode). Hope this helps

0/9000