0

my next question for today. In the Task Object, I have added a detail page link button, from which i would like to filter a custom report by contact id so far, I adopted another link

https://cs83.salesforce.com/00O4E000000JfoP?scopeid={!Contact.Id}

00O4E000000JfoP stands for the report, i created, which works fine, but the filter doesn´t. How can i get a prefilter like we have at campaign reports?

Thanks a lot for your help!

2
  • 1
    url hacking reports requires using the pvX parameter where X = 0,1,2,... corresponding to the 1st through nth filters defined in the report. See salesforceben.com/salesforce-reports-url-hack
    – cropredy
    Commented May 19, 2016 at 4:29
  • Hi cropredy, unfortunately, you have not answered to my question, so i can not mark this as a solving answer, thx anyway for the link, works great now, nice to know all these options...everyday, i learn a new hidden functionality ;) Commented May 19, 2016 at 8:01

1 Answer 1

1

Ralf

If you are going the URL hacking approach for reports, this blog does a good job of walking you through the steps.

Basically, you set up a report with predefined filters (using the Add button) where the field name and operator are preset and the comparand value not relevant if you plan on overriding the value.

Contact ID equals anything
Stage equals anything
...

The first filter's comparand value is set by URLParam pv0, the second comparand is URL param pv1, and so on

Best practice is to put this report in some folder that is off limits to editing by anyone other than the sysad as if the filters are reordered or you change the field name, the URL hacking override will fail.

Note that the filters at the top of the report builder should be set to pull in all records that could ever be needed as overriding those params is beyond the scope of this answer (so, be sure to include a date filter that includes all records you would ever need and qualify the date range with a pvX parameter if you just need THIS_QUARTER)

Note that if overriding a pvX comparand that can take on the value of a special date filter, use the SOQL syntax, not the user syntax. That is, THIS_QUARTER not This Quarter.

The usual caveats exist on URL hacking, these params are not SFDC-supported and could change. I would note that Conga's entire application leverages overriding pvX to provide runtime customization of Conga Composer reports so they'd be pretty mad if SFDC made a change. And Conga is one of SFDC's leading appexchange partners.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .