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
Chris SoricelliChris Soricelli 

Create an Action to replace a URL Hack button that launches a report

Hello,

We are looking to migrate to Lightning and I have a lot of custom buttons that use url hacks to pass a parameter from a custom object to a report.  It seemed very simple using the url hack, but I can't figure it out using a Publisher Action, which is supposed to be easier.  My report buttons are generally simple - They just pass the info in a field to a report filter.  Any advice on how I can accomplish this?  An example of one of my buttons is below.

/00O370000029gps?pv0={!Client_Master__c.Name}
Alain CabonAlain Cabon
Hello,

The easiest way is to remove your buttons and replace them with links included into the page itself (formula fields HYPERLINK or a VFP for different links according the environment (classics or lightning)): https://success.salesforce.com/answers?id=9063A000000DiEIQA0

https://na1.salesforce.com/one/one.app#/sObject/00OR0000000PCHYMA4/view?t=1479844235107&fv0=param1
fv0 — The fv stands for "filter value," and is the name of the parameter. The 0 is the numerical order in which the filter appears in the report. 

https://help.salesforce.com/articleView?id=reports_filter_url.htm&type=5

If you want a button instead of a link, you can create a LEX component with JS controller using <lightning:button> and put it into the page too but the buttons will exist in LEX only (by definition, these buttons will not appear in Classics).

The new buttons on the top of the page are always Quick Actions in LEX and the associated components are popups, modal forms (indirection).