+ Start a Discussion
AJ-ITIAJ-ITI 

Custom Link to dynamic report

I'd like to create a custom link on the account page, which will link to a report. However, I want the report to only show values for that particular account. For instance, it would show all the activities for that account categorized by type of activity. I'm not sure how to use a link to dynamically customize a report like that. 

I can't figure out how to do this, and SF support sent me here... 

 

Thanks!
Ariel

Best Answer chosen by Admin (Salesforce Developers) 
MiddhaMiddha

Hi Ariel,

 

You can create a report with some specific Account Id. for instance you can create a report which lists all the Activities where AccountId= <SOME ACCOUNT ID>. Save this Report.  Copy the report URL which looks something like this:

 

https://na6.salesforce.com/00O80000003p7M4

 

Create a custom link on Account Object with URL like: https://na6.salesforce.com/00O80000003p7M4?pv0={!Account.Id}

 

Now, when you click this URL it will pass the Account Id dynamically and you;ll see the Activity records related to that particular Account only. Hope this helps!!

 

/G 

All Answers

MiddhaMiddha

Hi Ariel,

 

You can create a report with some specific Account Id. for instance you can create a report which lists all the Activities where AccountId= <SOME ACCOUNT ID>. Save this Report.  Copy the report URL which looks something like this:

 

https://na6.salesforce.com/00O80000003p7M4

 

Create a custom link on Account Object with URL like: https://na6.salesforce.com/00O80000003p7M4?pv0={!Account.Id}

 

Now, when you click this URL it will pass the Account Id dynamically and you;ll see the Activity records related to that particular Account only. Hope this helps!!

 

/G 

This was selected as the best answer
NBlasgenNBlasgen
I never knew that was possible.  I was going to say it might be possible to use VisualForce but that I didn't think it could be done on a Report.  Now I stand corrected and I've learned something new.  Thanks!
Ispita_NavatarIspita_Navatar

You can achieve your purpose by creating a report which takes a parameter? For this in - Step 6 of report creating wizard (where you provide the filter criteria) : Select your report criteria -- Select the field for AccountId or Account Name from the drop-down of fields and select the operator as "equals" and leave the value field as empty.


Now you can create a custom link on "Account" object as per the following link:-


/ReportTypeId?pv0={!AccountName or AccountId}


Hope this works for you. Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

 

AJ-ITIAJ-ITI
Thanks! both solutions helped me. These discussion boards rock!
ShellBlack.comShellBlack.com

Here is a step-by-step tutorial: http://www.shellblack.com/salesforce/deploy/custom​-report-links/

 

Additionally there is a pdf published by Salesforce on Building Custom Report links

 

Enjoy!

 

ShellBlack.com

HaiderHaider

Hi Gulshan,

 

Thnx for the post, it was really helpful. I am using account name and it is working perfectly but when the account name is coming with any special character it is behaving differently. Like Account name is 'Dun&Brad'. I can use Id instead of account name but i would like to know if we can skip this special character dynamically for account name.

 

Thanks,

Haider

 

 

 

 

 

MaksimASMaksimAS

Have you tried this with winter 13? it does not work for me in new release but works fine in summer 12

Bing Demo MaletzBing Demo Maletz
Hi Shellblack.com
Thanks for your tutorial. That is very helpful.
Bing
Nishant Singh PanwarNishant Singh Panwar
Hi Everyone!

I wish to pass the parameters in a Joined Report and this method doesn't work.

Have anyone created Joined report with dynamic parameters?

Thank You.
Nishant 
 
Srikanth bantu 9Srikanth bantu 9
Hi Everyone,

I have a similar requirement, it worked well for me in salesforce classic but some how it is not working as expected in lightning mode. I have report filter on a link, on click (example regions, NA, SA, India) it will take to regions report. When ran same report on lighting it is giving me results without filtering (all regions).

How can i get dynamic report on lightning mode work?? I tried a lot but failed. Any suggestions please

Thanks You
Srikanth
Diana HollandDiana Holland
I'm having the same problem as Srikanth.  Doesn't seem to be working in lightening.  Anyone know if this is a bug or just a limitation of lightening and what, if any workaround there is?
MoreyJonesMoreyJones
This is great. Thanks!
Tom Briggs 8Tom Briggs 8
The same problem is occuring for me on ligntning  - Is there any workaround for lightning?
SAP_CRMSAP_CRM

Hello Experts,
I have a joined report and I wish to dynamically pass paraments (Account Name) to both the blocks. Each block has 3 filters and I need to pass the parameter for the first filter in each block.

Thanks for your time.
Regards,
Suhel

Dan Cline 1Dan Cline 1
I'd like to create a custom link on the account page in Lightning, which will link to a report. However, I want the report to only show values for that particular account. For instance, it would show all the activities for that account categorized by type of activity. Please help.
Dan Cline 1Dan Cline 1
I have the same custom link created in 'Classic' that works fine. This is the link that works in Classic but not Lightning:

/00O37000002CcP1?pv0={!Account.Company_Domain__c}&pv1={!Account.Name}
Brandon Smith 47Brandon Smith 47
You will need to change to link to follow the new lightning formatting first.
Example: https://danielsgh.lightning.force.com/one/one.app#/sObject/00O6A000002B0sSUAS/view

Next, the formatting of the parameter call has changed instead of "?pv0=" the call is now "?fv0="

Once you have made these changes your link should work properly in lightning.

More detailed instructions are available here: https://medium.com/salesforce-lightning-reports-and-dashboards/one-report-to-rule-them-all-reduce-clutter-with-dynamic-report-filters-41c8e4732b76