Friday, June 5, 2015

Export Report Functionality

First id is the report ID.
pv0: passed parameter for the filters (optional)
xf: is either csv or xls
enc: UTF-8 or SO-8859-1
{communityname}: replace if the user is accessing the report export from a community/portal and note the users need the "Export Reports" permission on their profile/permission set and also access to the report folder/report.

CSV
https://na1.salesforce.com/00O600000041iBL?pv0=aBA600000004DRF&export=1&enc=UTF-8&xf=csv
https://na1.salesforce.com/{communityurlname}/00O600000041iBL?pv0=aBA600000004DRF&export=1&enc=UTF-8&xf=csv

HTML/Excel
https://na1.salesforce.com/00O600000041iBL?pv0=aBA600000004DRF&export=1&enc=UTF-8&xf=xls
https://na1.salesforce.com/{communityurlname}/00O600000041iBL?pv0=aBA600000004DRF&export=1&enc=UTF-8&xf=xls 

This can can be used in javascript (buttons/links) on page layouts, apex, and visualforce page.

No comments:

Post a Comment