How to redirect between lightning components in communities
Clash 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.......
lightning-components lightning lightning-community
New contributor
add a comment |Â
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.......
lightning-components lightning lightning-community
New contributor
add a comment |Â
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.......
lightning-components lightning lightning-community
New contributor
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
lightning-components lightning lightning-community
New contributor
New contributor
New contributor
asked 2 hours ago
FredrikUNS
63
63
New contributor
New contributor
add a comment |Â
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
add a comment |Â
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.
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.
edited 1 hour ago
answered 1 hour ago
glls
10.1k61945
10.1k61945
add a comment |Â
add a comment |Â
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.
FredrikUNS is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password