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
Force2b_MikeForce2b_Mike 

Report URL Parameters not working

In the past I was able to use the pn, pc and pv parameters on report URL's to dynamically add filters via the URL. That functionality stopped working recently and I can't seem to get it to work at all anymore.

For example, this URL works but only because I have the field saved as the first filter: /00O5000000328yO?pv0=031

However, if I try to change the first parameter using pc0= all the filters are removed when the report runs: /00O5000000328yO?pc0=00N500000029a7k&pn0=eq&pv0=031. I tried using the field name as well as both the 15 and 18 character versions of the field ID. Same results. In the past I was able to pass in the 15 character field ID as the pc0 parameter.

Is there a way to do this any more?

 


 

Best Regards,

 

Mike

CrocketCrocket

Mike:

 

Did you ever get this working? I have having a similar issue in that using just the pvX parameters the report is generated through the URL parameters. However, when I use pcX and pnX, the parameters are not recognized. As I understand it, pc should be the field name that is specified in the report and pn is the operator (e.g. eq for equals, lt for less than). Considering how useful this feature is I am surprised to find that it is poorly documented. Any info you can provide will be appreciated.

 

Thanks

 

Crocket

Force2b_MikeForce2b_Mike

Crocket,

 

Unfortunately I still have the same issue. At this point, we're considering re-writing all the reports to hardcode the criteria (fields in particular) and then just change the operator or value. 

 

Best Regards,

 

Mike

CrocketCrocket

Mike:

 

Thanks for the response. I wanted to use the URL field names to give users the ability to see which fields were sent to generate the report. Instead, I added a field next to the 'display report' link, and a user-friendly version of the field list is provided. It is probably a better solution.

 

Even with all its caveats, it is an exciting time to be a cloud computing programmer (as opposed to Java-only).

 

Crocket

EHatEHat

Hi Mike and Crocket, did you ever get this to work?  I think worked briefly for me but I cannot reproduce the results now.  I am trying to use the reports in conjuction with Drawloop from the AppExchange.

When I change the pc it removes that filter from the report.  I have also tried with 15 and 18 character IDs. 

Kris RyanKris Ryan
I found the following thread on how to get the ID of the custom field you want to use in pc0:
https://success.salesforce.com/answers?id=90630000000gtuZAAQ
This worked for me, so hopefully, this will help anyone else experiencing the same issues. It is not the 15 or 18 character ID of the custom field. Not sure what ID it is!