3

I have an outputlink on my Visualforce page. I am using the standard Account controller. Here is the code: <apex:outputLink title="Active" value="../00O7A000000OQRF?pv0={!Account.Id}&export=1&enc=UTF-8&xf=xls">All Active State Members</apex:outputLink>

The two dots in front of the forward slash are a required oddity of working with Communities, at least when you use custom links. It also does not seem to change my issue (see below) if I remove them or not.

The issue I am having is that when I use the custom link on the Account object with the Exact same code ../00O7A000000OQRF?pv0={!Account.Id}&export=1&enc=UTF-8&xf=xls clicking it generates a report with the correct filter applied. When I do this from a VF page using the outputlink (as above), for the same record, I get zero results in my report. I am wondering if it has to do with the ID of the record which is returned--it seems like when it comes from the VF page, I get the full Id while when I use the ID within a regular link, I get the shortened one.

Any help would be appreciated, and if you have explanations as to why the behavior is different between custom links on the standard page and the outputlink, I'd appreciate that.

  • Try the 15 character Id of report – Vigneshwaran G Oct 2 '15 at 16:25
  • I am already using the 15 character Id of the report. Do you mean the 15 char Id of the Account Id? – mpusto Oct 2 '15 at 19:35
0

An update: I was using a formula field as my filter within the report, with the value of Account.ParentID on the record. It turns out that when you do that, it displays the truncated Id. Once I changed my formula field to CASESAFEID(Account.ParentID) it fixed the issue.

So for future reference, Account.ParentID (at least in formulas) does NOT return the full 18 digit value of the Id.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.