Hi everyone, I have created a custom Suitelet repo...
# general
v
Hi everyone, I have created a custom Suitelet report that uses search.runPaged() with pagination to display transactions in the UI. For CSV export, I loop through all pagedData.pageRanges and fetch all pages, so the CSV file correctly exports the complete dataset. However, when trying to export the report to Excel or PDF using the HTML table rendered in the Suitelet, the export only includes the current page's data because the HTML contains only the records of that page. My question is: In a paginated Suitelet report that uses runPaged(), what is the recommended approach to export the full dataset to formatted outputs like Excel or PDF? Is there a standard pattern for generating a full export in such cases, or is CSV typically the only practical option for exporting large multi-page datasets?
b
there are various way you can do it, none of which would be considered paginated. You aren't doing pages if you are trying to export everything
for pdf, you can make your suitelet write a file created by N/render
👍 1
excel files usually resort to the external sheet js module. Keep in mind that N/file expects content like excel files to be base 64 encoded