0

We have a google chart on our Engagement__c object, that is written to run a report on click with a passed parameter. This works perfectly in the browser. However, when clicking the link while in SF1, the report finds no data. I assume it has to do with how to correctly pass the record id parameter to the SF1 version of the report. But heck if I know what I'm doing wrong.

(section of code that determines the device and the URL calls)

if((typeof sforce != 'undefined') && (sforce != null) ) {
     if (party == 'Initial Contact'){
          sforce.one.navigateToURL ('https://company--pocpartial.cs22.my.salesforce.com/{!$label.report1}?pv0={!Engagement__c.Id}');
          }
     }
     else {              
          if (party == 'Initial Contact'){
               window.open ('https://company--pocpartial.cs22.my.salesforce.com/{!$label.report1}?pv0={!Engagement__c.Id}');
          }
     }
}
2

Passing parameters to standard pages (including Reports) is not yet possible in Salesforce1.

To get around this, at present, you'd need to create the Reports/Charts using Visualforce. (Visualforce pages can accept parameters.) Here's a reference for Charting with Visualforce: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_charting.htm

There's an Idea on the Idea Exchange you can vote on as well, to encourage the Product Team to support parameters on standard pages: https://success.salesforce.com/ideaView?id=08730000000DjkfAAC

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.