0

I have three VF pages: TabulisedPage,OverridingPage and FinalPage.

VF page :TabulisedPage

<apex:page >
<apex:includeScript value="/support/console/42.0/integration.js"/>

     <A HREF="#" onClick="openOverridingPage();return false">
         Click here to open hyphenation</A><br/>    
    <script type="text/javascript">
        function openOverridingPage() {
            sforce.console.openPrimaryTab(null, '/apex/OverridingPage', false, 
                'salesforceee', openSuccess, 'salesforceeeTab');
        }

        var openSuccess = function openSuccess(result) {
            if (result.success == true) {
                alert('Primary tab successfully opened');
            } else {
                alert('Primary tab cannot be opened');
            }
        };
  </script>

</apex:page>

VF page: OverridingPage

<apex:page standardController="account" sidebar="false" showHeader="false">
    <apex:includeScript value="/support/console/42.0/integration.js"/> 

      <A HREF="#" onClick="openFinalPage();return false">
             Click here to get enclosing id</A>

    <script>
    function openFinalPage() {
            alert(sforce.console.isInConsole());
                sforce.console.openPrimaryTab(null, '/apex/FinalPage', false, 
                    'salesforceee', openSuccess, 'salesforceeeTab');
            }


            var openSuccess = function openSuccess(result) {
                //Report whether opening the new tab was successful
                if (result.success == true) {
                    alert('Primary tab successfully opened');
                } else {
                    alert('Primary tab cannot be opened');
                }
            };

    </script>
    </apex:page>

The requirement is to finally open FinalPage in a primary tab. I have following two approaches:

  • A VF Tab containing TabulisedPage is used in lightning console. On clicking link in the TabulisedPage , OverridingPage opens in a primary tab. Then on clicking the link inside the OverridingPage, FinalPage opens in a primary tab.

  • OverridingPage is used to override Account view. On opening an account, OverridingPage shows up . On further clicking the link on OverridingPage, FinalPage cannot be opened in a primary tab and callback method returns failure message.

Is there any limitation with VF pages which override in lightning consoles as the second approach is working in classic console?

Similarly, other toolkit methods like getEnclosingPrimaryTabId() are also not working in the second approach.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.