2

Current Implementation:

I am tweaking existing VisualForce Page to be compatible with both Single Page Application based Lightning theme and Complete refresh based Classic theme.

Note: Since the component is inside an Iframe Section I have to do top.location.

        (function(myContext){
            myContext.ForceUI = myContext.ForceUI || {};
            myContext.ForceUI.isSalesforce1 = function() {
                return((typeof sforce != 'undefined') && sforce && (!!sforce.one));
            }
        })(this);

        $(document).on('click','.allMyHyperlinks',function(event) {
            event.preventDefault();
            if( ForceUI.isSalesforce1() ) {
                sforce.one.navigateToUrl($element.attr('href'));
            }
            else {
                top.location=$element.attr('href');
            }                
        });

This works perfectly fine on navigating to another VisualForce page and sforce.one.navigateToSObject(recId) for navigating to other objects.

Problem:

I am not able to navigate to a report with reportFilters. I couldn't find any documentation which explains how to pass reportFilters through sforce.one methods.

Attempts:

  1. sforce.one.navigateToURL('/00O28000008ye7BEAQ/view?reportFilters=[{"value":"0012800000uT2Tg","operator":"equals","column":"AccountID"}]');
  2. sforce.one.navigateToSObject('/00O28000008ye7BEAQ/','reportFilters=[{"value":"0012800000uT2Tg","operator":"equals","column":"AccountID"}]');

but no luck

2

Navigating to the reports currently is not supported and none of the hacks do work .I had raised this with SFDC product manager and looks like the feature is upcoming but currently any hacks is not supported for report page in lightning or SF1

Here is response from Product team

enter image description here

Also a safe harbor and looks like the roadmap site also shows same

  • Oops! thats a bummer, currently I am doing top.location='/one/one.app#/00O28000008ye7BEAQ/view?reportFilters=[{"value":"0012800000uT2Tg","operator":"equals","column":"AccountID"}] ' which reloads the entire page but works. Thank you for the exact roadmap reference. – karthikselva Nov 9 '16 at 0:56
  • ya what you are doing is a hack for now thats definitely not supported .Look for next release for proper recommendation – Mohith Shrivastava Nov 9 '16 at 0:58

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.