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!
Best Answer
Try appending the
isdtp=p1
parameter to your URL.We use a URL similar to the below one for extracting reports in CSV format:
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 toisdtp=p1
made it work both in Classic and Lightning.