Dynamic Report Filters

newsletter Nov 13, 2024

Quick tip this week.

You can pass filter values into the URL of a report in order to dynamically change what the report shows.

Pretend you have an Opportunity report with one filter on the AccountID field.

So all the Opportunities on the report are related to the Account you filter on.

Normally your report URL would look something like:

yoursalesforce.com/lightning/r/Report/00Oak000009CJUjEAO/view

By adding a “?fv0=” at the end of the URL, you can pass any AccountId into the report for it to filter on dynamically when it loads. 

Like this:

yoursalesforce.com/lightning/r/Report/00Oak000009CJUjEAO/view?fv0=001ak000009juju

When you click this modified URL, the report will load specifically for the AccountID you added to the URL.

You can even pass in values for several filters by using fv0, fv1, fv2, etc. as long as you separate them using the “&” sign.

Like this:

yoursalesforce.com/lightning/r/Report/00Oak000009CJUjEAO/view?fv0=001ak000009juju&fv1=accountName

You can use dynamic filtering in hyperlink formulas for list views, flow emails, formula fields on record pages, and more.

It’s a useful thing to know, and I had to relearn how it worked this week, so I thought I’d share.

Hope it helps!

Best,

Nick

SalesforceĀ Saturdays

Join the Salesforce Saturday newsletter. Every Saturday, you'll get 1 actionable tip on Salesforce technology or career growthĀ related to the Salesforce Industry.

We hate SPAM. We will never sell your information, for any reason.