URL Hack Button In Lightning Experience To Show Report

URL Hack button in Salesforce- Classic:
In this example, create a list button in Account object. When we click custom button on account detail page, it will redirect to the custom report. You can add URL parameter to the link that represents the report filter.
Go to Setup -> Account-> Buttons, Links, and Actions-> New Button or Link. Create a New  button and add to the Buttons in Account layout.

/00Ot0000000VeqV?pv0={!Account.ParentId}&pv1={!Account.Id)}


Here,

00Ot0000000VeqV : Report Id

pv0  : The “pv” in pv0 stands for “parameter value”, where “0” is the location of the value you want to set.
pv1 : “1” is the location of the value you want to set.




URL Hack button in Salesforce- Lightning:
Go to Setup -> Account-> Buttons, Links, and Actions-> New Button or Link. Create a New  button and add to the  Salesforce Mobile and Lightning Experience Actions in Account layout.

{!$Site.BaseUrl}/one/one.app#/sObject/00Ot0000000VeqV/view?fv0={!Account.ParentId}&fv1={!Account.Id)}

Here,
{!$Site.BaseURL} : Returns the base URL of the current site that references and links should use.
fv0 : fv0 (or filter-value-zero) — the first URL parameter which corresponds to the first custom report filter. 
f1: Second URL parameter which corresponds to the second custom report filter. 


Comments

Popular posts from this blog

Syncing And Unsyncing Quote With Opportunity Using Flow And Process Builder