feed-icon-32x32.png

Subscribe in Feed Reader
Subscribe by Email

Learn how Salesforce.com can help your business
arrowpointe @ twitter
  • anyone use Salesforce's knowledge base? (the old school one) Notice scrollbars appearing in the content recently? 1 day ago
  • yes, i can use aggregate functions in dynamic soql. asked too soon, sorry 1 day ago
  • can i use aggregate functions in the Database.query() method? 1 day ago
  • what's the timing for new IDE? will it run just as well on eclipse 3.4 as 3.5? major benefits of 3.5 (i only use eclipse for salesforce)? 2 days ago
  • anyone use campaignmonitor with salesforce? no integration, but seems like a slick tool. curious about your process re: subscriber sync 2 days ago
  • is there a apex method or query that can tell me whether a subscriber org has a Trial vs. Active license of my package they installed? 2 days ago
  • feels like the new salesforce ui uses JavaScript libraries and rendering more friendly to fitefox's memory issues. Real or my imagination? 4 days ago
  • More updates...

Powered by Twitter Tools

Auto Create Reports from Web Links

There is a little documented trick for building dynamic reports that can be launched from Web Links on a specific record. You can setup reports with pre-set criteria and pass the criteria values dynamically to the report through a URL string. To do so, pass the parameter values in the URL string where

pv0 is the value of the first parameter
pv1 is the value of the second parameter
pv2 is the value of the third parameter
and so on…

The URL would be:

https://na1.salesforce.com/id_of_the_report?pv0=value&pv1=value

Build this link this using a weblink or sforce control.

For example, suppose your company uses a Parent-Child account hierarchy. Suppose you do business with a number of GE subsidiaries and have a parent GE account is used to bring all of those accounts together. You want to easily run a report for all of the Opportunities related to the child accounts of that GE parent account.

To do this, create a Web Link to dynamically generate the report from an Account record.

Here’s how you do it:

Create an Opportunity report with the format you want. Add a single criteria line using the Parent Account ID field. Set the condition to “equals”. Leave the value blank. Save the report and note the URL of the report.

Create an Account web link that is a URL. The URL is “/id of the report?pv0={Account ID}“. Put that web link on the account page layout. When you run this report, the weblink will pass the Account ID into the first report criteria value. In this case, that’s the Account ID. So this report will pull all Opportunities where the Parent Account ID equals the Account ID of the Account record you clicked the weblink from. If you run that report from the GE record, it will pull up all Opportunities for child accounts of GE.

The parent-child situation is just 1 example. The concept can be used for a lot of situations where you cannot hardcode the criteria you need into the report.

Leave a Comment

All comments are moderated. Other visitors will not see your comment until it has been approved.