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
TjonesTjones 

How do I pass an account id into filter field on a custom report via a link on the account record?

How do I pass an account id into filter field on a custom report via a link on the account record?

 

Want to create a generic report that I can run directly from any account record page.  Is it possible to click the link, have the account id passed into the report filter criteria field then run report?

 

Help is appreciated.

 

 

hisrinuhisrinu

Hi,

 

You can create  a custom link: the URL should be the report URL.

Extend the URL using custom variables and set the value of custom variable to Account Id using merge fields:

 

https://www.salesforce.com/ReportID?pv0={ !Account.Id} //Full URL


or /ReportID?pv0={ !Account.Id}//Relative URL


Replace ReportID with Salesforce report id

TjonesTjones

Tried it several ways, but no luck.  I keep getting a generic Salesforce.com home page that says "whoops the page your looking for isnt here."

 

https://na6.salesforce.com/servlet/servlet.Integration?lid=00b80000001BbPU&eid=0018000000TksNZ&ic=1

 

Here is what I put in the link:

 

https://www.salesforce.com/00O80000003PXuG?pv0={!Account.Id}&retURL=%F00O80000003PXuG?pv0={!Account.Id}

 

What am I doint wrong?

 

Thanks for the help.

 

 

SteveMTCSteveMTC
I think you need to change the second pv0 parameter - it should be pv1 (indicating the second criteria paramater in your report).
hisrinuhisrinu

Try the below one, don't give any return URL.

 

/00O80000003PXuG?pv0={!Account.Id}

 

It should work

Message Edited by hisrinu on 01-11-2010 08:56 AM
BellaBella

I'm trying this too, and I can see the actual report, but the filter doesn't seem to be working. I'm seeing a generic report, not one for the specific account. Any thoughts?