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
Darko TodorovskiDarko Todorovski 

Dynamic reporting with visualforce

Hi,

I am strugling with some code and i need an assistance.

I've created a report called Rev.Share for Parent Acc. In that report i have couple of columns see below.
Columns in my report

Furthermore to generate this report from certain account i've created this code.

 

<a href="/00O200000070NYu?pv0={!Account.ParentID}" target="_blank" class="box"><div class="box">Parent Account</div></a></td>


In the code above i take the report url and i put some parameters. ParentID is a formula from where i get my parentid. Usually i don't need this because i can get the id from Parentid field but anyway i put it there so i might remove it. then i set the criteria to be equal and past the value of the ParentID to be 15 characters. 

However when i run the report i have additional 3 characters in the field. See below.
error showing 3 more letters

How can i eliminate this problem?

 

Thanks,

Darko

Darko TodorovskiDarko Todorovski

Hi I solve my problem.

<a href="/00O200000070NYu?pv0={!LEFT(Account.ParentID,15)}" target="_blank" class="box"><div class="box">Parent Account</div></a></td>

I should have used LEFT so that can give me the first 15 left characters.

Found this article useful.

https://developer.salesforce.com/forums/?id=906F0000000AgvBIAS

Thanks,

Darko