function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Philip ZimmermanPhilip Zimmerman 

Converting JS to Lightning for Report Parameters

I'm trying to replicate a custom button I had that would launch a report and immediately bring up the dialogue box to save the report.

I used this code to make that happen:'/00O63000000HEhL?pv0={!Batch__c.Id}&export=1')

I have read all of the documentation and am trying to get the following to work:
{!URLFOR( $Action.Report.ReportExportAction , "00O63000000HEhL", [ fv0=Batch__c.Id ])}

Anybody know what I am doing wrong here?  It will launch the report but will not apply my parameters and will not export it.

Diksha Goel 6Diksha Goel 6

Hey Philip,

Refer this,

Hope this helps you.

Diksha Goel

Sukanya BanekarSukanya Banekar
You should give the org instance url in'org instance url/00O63000000HEhL?pv0={!Batch__c.Id}&export=1')
Let me know if this works

Sukanya Banekar
Pramodh KumarPramodh Kumar
@Philip Zimmerman

Js buttons wont work in lightning environment. For your requirement you have to create the New Button/Link as URL type.

First pieces you need domain    ""
second you need 18 digit report Id for exporting the report. If you wont include the 18 digit report id then you wont get the export option.

Example here is the url for the report including the filters{!Batch__c.Id}&export=1