Keep focus on desired tab in Salesforce Application

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












I am having an application in which I have added one Tab in it also it has a default Home Tab.



Now I need to open up another visualforce page on a button click.



I have used PageReference here :



 public PageReference GoToMasterPage()
PageReference pr = new PageReference('/apex/MySecondPage');
pr.setRedirect(true);
return pr;



whenever it gets eecuted it opens up correct vf page but, the focus always shifts to Home Tab which was present by default.



I do not want focus to shift to Home tab or any other tab. I need focus on the currently selected tab itself.
How can I achieve this.



Thanks in Advance.










share|improve this question



























    up vote
    1
    down vote

    favorite












    I am having an application in which I have added one Tab in it also it has a default Home Tab.



    Now I need to open up another visualforce page on a button click.



    I have used PageReference here :



     public PageReference GoToMasterPage()
    PageReference pr = new PageReference('/apex/MySecondPage');
    pr.setRedirect(true);
    return pr;



    whenever it gets eecuted it opens up correct vf page but, the focus always shifts to Home Tab which was present by default.



    I do not want focus to shift to Home tab or any other tab. I need focus on the currently selected tab itself.
    How can I achieve this.



    Thanks in Advance.










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am having an application in which I have added one Tab in it also it has a default Home Tab.



      Now I need to open up another visualforce page on a button click.



      I have used PageReference here :



       public PageReference GoToMasterPage()
      PageReference pr = new PageReference('/apex/MySecondPage');
      pr.setRedirect(true);
      return pr;



      whenever it gets eecuted it opens up correct vf page but, the focus always shifts to Home Tab which was present by default.



      I do not want focus to shift to Home tab or any other tab. I need focus on the currently selected tab itself.
      How can I achieve this.



      Thanks in Advance.










      share|improve this question













      I am having an application in which I have added one Tab in it also it has a default Home Tab.



      Now I need to open up another visualforce page on a button click.



      I have used PageReference here :



       public PageReference GoToMasterPage()
      PageReference pr = new PageReference('/apex/MySecondPage');
      pr.setRedirect(true);
      return pr;



      whenever it gets eecuted it opens up correct vf page but, the focus always shifts to Home Tab which was present by default.



      I do not want focus to shift to Home tab or any other tab. I need focus on the currently selected tab itself.
      How can I achieve this.



      Thanks in Advance.







      apex visualforce pagereference






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 3 hours ago









      rrc1709

      386




      386




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          If the new tab which you created is a visual-force tab than add tabStyle attribute in page tag in your MySecondPage page. So the page code would be like :



          <apex: page tabStyle="TabName__tab">
          <!---page code-->
          </apex:page>


          If the tab related to custom object then:



          <apex:page tabstyle="CustomObject__c">
          <!---page code-->
          </apex:page>





          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "459"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f235862%2fkeep-focus-on-desired-tab-in-salesforce-application%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            3
            down vote



            accepted










            If the new tab which you created is a visual-force tab than add tabStyle attribute in page tag in your MySecondPage page. So the page code would be like :



            <apex: page tabStyle="TabName__tab">
            <!---page code-->
            </apex:page>


            If the tab related to custom object then:



            <apex:page tabstyle="CustomObject__c">
            <!---page code-->
            </apex:page>





            share|improve this answer


























              up vote
              3
              down vote



              accepted










              If the new tab which you created is a visual-force tab than add tabStyle attribute in page tag in your MySecondPage page. So the page code would be like :



              <apex: page tabStyle="TabName__tab">
              <!---page code-->
              </apex:page>


              If the tab related to custom object then:



              <apex:page tabstyle="CustomObject__c">
              <!---page code-->
              </apex:page>





              share|improve this answer
























                up vote
                3
                down vote



                accepted







                up vote
                3
                down vote



                accepted






                If the new tab which you created is a visual-force tab than add tabStyle attribute in page tag in your MySecondPage page. So the page code would be like :



                <apex: page tabStyle="TabName__tab">
                <!---page code-->
                </apex:page>


                If the tab related to custom object then:



                <apex:page tabstyle="CustomObject__c">
                <!---page code-->
                </apex:page>





                share|improve this answer














                If the new tab which you created is a visual-force tab than add tabStyle attribute in page tag in your MySecondPage page. So the page code would be like :



                <apex: page tabStyle="TabName__tab">
                <!---page code-->
                </apex:page>


                If the tab related to custom object then:



                <apex:page tabstyle="CustomObject__c">
                <!---page code-->
                </apex:page>






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 hours ago

























                answered 2 hours ago









                Pragati Jain

                55038




                55038



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f235862%2fkeep-focus-on-desired-tab-in-salesforce-application%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    List of Gilmore Girls characters

                    Confectionery