You need to sign in to do that
Don't have an account?
HarrySie
URL Hacking for passing Filters to Report
Hello, I've read a lot of things about URL Hacking to pass filters to a report. I've managed to create a report to pass all what I wanted to the predefined report and it worked in my sandbox. When I deployed it to production, it did not work. After that experience I caught the computed URL and typed it directly in. In sandbox the caught URL:
https://cs11.salesforce.com/00OZ0000000VfBZ?pc1=00N00000008am9F&pn1=co&pv1=%22berlin%22 worked. In production I did the same, the report showed up, but the filter did not work. Has anyone a hint, what this might cause?
Thanks
Harry
When you deploy your report/sobjects etc to production the ids will change. pc1 looks like an id - does an object with that id exist on your production system?
Hi Bob,
thanks for your advise, but the id of that custom field is the same in sandbox and production.
Best regards
Harald
So is the filter value that you are passing the id of a custom field? How does that work?
Hi Bob,
yes the filter field is a custom object field. I've learned that this is the right way to set the filter field, and it works in sandbox. The filter in sandbox of the report looks then:
Equipment: Record Type equals SO - Global Rollout
AND OFT City contains berlin
where the first one is hardcoded and the second is the dynamic filter expression. In production the filter is only:the hardcoded part of the filter.
Thanks for your help
Harry
Ah, so the id is actually the value of the custom field that you are filtering on, not the id. That makes a lot more sense.
Does a record type with that Id exist in your system?
The other thing I'd try is to recreate the report in production, to check your filter values etc.
Hi Bob,
deploying did it. Don't know why, but it works now. Will do some more testing and then deploying my apex code, that references this (new) report id again.
Thanks for your assistance
Harry