Hi All,
This is about how we can create dynamic reports in salesforce .
Suppose if we want to show two reports with filter "Account Name equals abc" and "Account Name equals xyz". So there is no need to create two different reports for it, we can pass filter value in URL at runtime.
Now create two link which will redirect to a VFP, with the filter param value by which report will be filtered. Now this VFP will redirect to report URL, e.g https://....../<reportId>?pv0=paramValue. Value passed in pv0 will automatically become the filter value for the report. Now if I pass ?pv0=abc report will show me all account with name "abc" and if I pass ?pv0=xyz report will show me all account with name "xyz".
Like this if we have more than one filters then we can also pass values for them like pv0 , pv1 , pv2 and so on.
Thanks
This is about how we can create dynamic reports in salesforce .
Suppose if we want to show two reports with filter "Account Name equals abc" and "Account Name equals xyz". So there is no need to create two different reports for it, we can pass filter value in URL at runtime.
Now create two link which will redirect to a VFP, with the filter param value by which report will be filtered. Now this VFP will redirect to report URL, e.g https://....../<reportId>?pv0=paramValue. Value passed in pv0 will automatically become the filter value for the report. Now if I pass ?pv0=abc report will show me all account with name "abc" and if I pass ?pv0=xyz report will show me all account with name "xyz".
Like this if we have more than one filters then we can also pass values for them like pv0 , pv1 , pv2 and so on.
Thanks
good Idea!
ReplyDeleteHi, i have created a custom link on account detail page. the link works fine if there is no white space. this link works fine https://na11.salesforce.com/00OG0000002imXl?pv0=test+agency as it is an account "test agency" but it failed to pull the report when the account name is "test agency, LLC". the link is rendered as https://na11.salesforce.com/00OG0000002imXl?pv0=test+agency%2C+LLC. when i look the look report it removes the space between comma and LLC. please help.
ReplyDeleteAdd HexaDecimal value for Space and Comma followed by %.
DeleteCheck the values here ---> http://www.ascii.cl/
Example: %20, %2D,...
This comment has been removed by the author.
ReplyDeleteGreat Idea!
ReplyDeleteHi,
ReplyDeleteWe are facing a problem for passing dynamic filter values to reports from partner communities. We have tried all the combinations of pv0 and fv0. It is working fine in a full org but filters are not being applied when we are trying it from partner communities.
Any help would be appreciated.
I am also facing same issue with lightning community can you please share ur solutions if you have find something .
DeleteThanks
Thanks for sharing this awesome piece of content. Surely This will help many people. I appreciate your hardwork and efforts.
ReplyDeletebest audience response system
audience response rentals
audience response rentals
audience response rentals