How to redirect between lightning components in communities

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 have 2 components that I wish to use in a lightning community.



The first component produces a list of records and if the user clicks on the name of the record i want to redirect them to another lightning component.



Here's the code I'm using to redirect and it works when not in the community



 newRedirect: function (component, event, helper) 
console.log('get ready to navigate');
var navService = component.find("navService");
var pageReference =
"type": "standard__component",
"attributes":
"componentName": "CS_Inventory_v2"
,
"state":
;

navService.navigate(pageReference);




It feels like I'm missing a setting.......










share|improve this question







New contributor




FredrikUNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    up vote
    1
    down vote

    favorite












    I have 2 components that I wish to use in a lightning community.



    The first component produces a list of records and if the user clicks on the name of the record i want to redirect them to another lightning component.



    Here's the code I'm using to redirect and it works when not in the community



     newRedirect: function (component, event, helper) 
    console.log('get ready to navigate');
    var navService = component.find("navService");
    var pageReference =
    "type": "standard__component",
    "attributes":
    "componentName": "CS_Inventory_v2"
    ,
    "state":
    ;

    navService.navigate(pageReference);




    It feels like I'm missing a setting.......










    share|improve this question







    New contributor




    FredrikUNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have 2 components that I wish to use in a lightning community.



      The first component produces a list of records and if the user clicks on the name of the record i want to redirect them to another lightning component.



      Here's the code I'm using to redirect and it works when not in the community



       newRedirect: function (component, event, helper) 
      console.log('get ready to navigate');
      var navService = component.find("navService");
      var pageReference =
      "type": "standard__component",
      "attributes":
      "componentName": "CS_Inventory_v2"
      ,
      "state":
      ;

      navService.navigate(pageReference);




      It feels like I'm missing a setting.......










      share|improve this question







      New contributor




      FredrikUNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I have 2 components that I wish to use in a lightning community.



      The first component produces a list of records and if the user clicks on the name of the record i want to redirect them to another lightning component.



      Here's the code I'm using to redirect and it works when not in the community



       newRedirect: function (component, event, helper) 
      console.log('get ready to navigate');
      var navService = component.find("navService");
      var pageReference =
      "type": "standard__component",
      "attributes":
      "componentName": "CS_Inventory_v2"
      ,
      "state":
      ;

      navService.navigate(pageReference);




      It feels like I'm missing a setting.......







      lightning-components lightning lightning-community






      share|improve this question







      New contributor




      FredrikUNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      FredrikUNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      FredrikUNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 2 hours ago









      FredrikUNS

      63




      63




      New contributor




      FredrikUNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      FredrikUNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      FredrikUNS is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          Couple of things:




          This pageReference feature is supported only in Salesforce Lightning and the Salesforce Mobile App. It does not work for components that are embedded in a flexipage.




          Neither does it state supporting lightning communities.



          If the component is in the same community page, you might have to add your components in a wrapper component and manage the logic in it using lightning events.



          If the initial list component is on 1 page, and the other is in on another, then you will have to use lightning Navigate ToURL event to navigate between views.






          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
            );



            );






            FredrikUNS is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f235925%2fhow-to-redirect-between-lightning-components-in-communities%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
            2
            down vote













            Couple of things:




            This pageReference feature is supported only in Salesforce Lightning and the Salesforce Mobile App. It does not work for components that are embedded in a flexipage.




            Neither does it state supporting lightning communities.



            If the component is in the same community page, you might have to add your components in a wrapper component and manage the logic in it using lightning events.



            If the initial list component is on 1 page, and the other is in on another, then you will have to use lightning Navigate ToURL event to navigate between views.






            share|improve this answer


























              up vote
              2
              down vote













              Couple of things:




              This pageReference feature is supported only in Salesforce Lightning and the Salesforce Mobile App. It does not work for components that are embedded in a flexipage.




              Neither does it state supporting lightning communities.



              If the component is in the same community page, you might have to add your components in a wrapper component and manage the logic in it using lightning events.



              If the initial list component is on 1 page, and the other is in on another, then you will have to use lightning Navigate ToURL event to navigate between views.






              share|improve this answer
























                up vote
                2
                down vote










                up vote
                2
                down vote









                Couple of things:




                This pageReference feature is supported only in Salesforce Lightning and the Salesforce Mobile App. It does not work for components that are embedded in a flexipage.




                Neither does it state supporting lightning communities.



                If the component is in the same community page, you might have to add your components in a wrapper component and manage the logic in it using lightning events.



                If the initial list component is on 1 page, and the other is in on another, then you will have to use lightning Navigate ToURL event to navigate between views.






                share|improve this answer














                Couple of things:




                This pageReference feature is supported only in Salesforce Lightning and the Salesforce Mobile App. It does not work for components that are embedded in a flexipage.




                Neither does it state supporting lightning communities.



                If the component is in the same community page, you might have to add your components in a wrapper component and manage the logic in it using lightning events.



                If the initial list component is on 1 page, and the other is in on another, then you will have to use lightning Navigate ToURL event to navigate between views.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 1 hour ago

























                answered 1 hour ago









                glls

                10.1k61945




                10.1k61945




















                    FredrikUNS is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    FredrikUNS is a new contributor. Be nice, and check out our Code of Conduct.












                    FredrikUNS is a new contributor. Be nice, and check out our Code of Conduct.











                    FredrikUNS is a new contributor. Be nice, and check out our Code of Conduct.













                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f235925%2fhow-to-redirect-between-lightning-components-in-communities%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                    Confectionery