Activity Forums Salesforce® Discussions Apex Page with analytics:reportChart in a Managed Package

  • Apex Page with analytics:reportChart in a Managed Package

    Posted by Nitish on April 30, 2016 at 5:39 pm

    I want to deploy an Apex Page that references a Report with analytics:reportChart in a Managed Package. The Report is also included in the Managed Package.

    This issues arises when the Apex Page needs to reference the reportID. The reportID will be different in every installed Managed Package. Any ideas on how I make this reference dynamic in the package?

    This is what my code looks like:

    <apex:page standardController="Account">
    <analytics:reportChart reportId="00Oe0000000aeYn" size="small"> </analytics:reportChart>
    </apex:page>

    Gourav replied 7 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Gourav

    Member
    June 13, 2016 at 2:44 pm

    Hi

    Try this link hope this will help you. It contains full description how to use dynamic reference for analytics:reportChart

    https://developer.salesforce.com/blogs/developer-relations/2013/09/using-the-salesforce-analytics-api-on-a-visualforce-page.html

     

    OR

    try this. it will not use reportId as filter try filtering on the Account Name and Site fields

    <analytics:reportChart reportId="INSERT_REPORT_ID_HERE"
    hideonerror="true"
    filter="{column:'Account.Name', operator:'equals', value:'{!Visit_Preparation__c.Account__r.Name}'},{column:'Account.Site', operator:'equals', value:'{!Visit_Preparation__c.Account__r.Site}'}"
    size="small"></analytics:reportChart>

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos