3

Is there a link that allows you to directly download a report in LEX (lightning experience) using a single link?

In classic, I would use https://org.my.salesforce.com/report_id?view=d&snip&export=1&enc=UTF-8&xf=csv, where the report_id would be the report ID.

For some context, I have a python script that looks through a list of report IDs to download on a monthly basis. However switching to LEX only opens the link and does not download it directly. I've tried manipulating the lightning URL but it still only opens up the page and doesn't download it.

(i.e. https://org.lightning.force.com/one/one.app#/sObject/report_id/view?export=1&enc=UTF-8&xf=csv)

Thanks for all your help everyone, it's greatly appreciated!

1 Answer 1

7

Try appending the isdtp=p1parameter to your URL.

We use a URL similar to the below one for extracting reports in CSV format:

/YOUR_REPORT_ID?csv=1&exp=1&enc=UTF-8&isdtp=p1

Before migrating to Lightning we used a similar link but we had the isdtp=mn set, which stopped working after the migration. Simply changing this parameter to isdtp=p1 made it work both in Classic and Lightning.

2
  • 1
    you sir deserve a medal, not sure why all the links I've seen and tried never mentioned this parameter.
    – Etienne
    Jul 9, 2019 at 7:55
  • Do you know how to make this work when the report is using a row-level formula which is only available in Lightning Reports? I'm getting an empty CSV when using this method on such a report... It seems as if the method here only works if the report is viewable in Classic. Jun 12, 2023 at 17:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .