Skip to main content
Stick to relevant information. Please edit this post to include explanation.
Source Link
Adrian Larson
  • 152.6k
  • 38
  • 250
  • 434

Hi you can use the below code

use the below component--https://developer.salesforce.com/docs/component-library/bundle/lightning:navigation/documentation

<lightning:navigation aura:id="navService"/> var navService = component.find("navService"); // Uses the pageReference definition in the init handler var pageReference = { type: "standard__component", attributes: { componentName: "Your Component Name", },state: { c__recordName: Any attribute which you want to pass, c__sc : Any attribute which you want to pass } }; event.preventDefault(); navService.navigate(pageReference); 

Write the below code in init of the component to which you want to navigate

var pageReference = component.get("v.pageReference"); var recordId =(pageReference.state.c__sc); var recordName = (pageReference.state.c__recordName); console.log('recordId'+recordId+'recordName'+recordName); 

Hope this will help you out.

Thanks

Hi you can use the below code

use the below component--https://developer.salesforce.com/docs/component-library/bundle/lightning:navigation/documentation

<lightning:navigation aura:id="navService"/> var navService = component.find("navService"); // Uses the pageReference definition in the init handler var pageReference = { type: "standard__component", attributes: { componentName: "Your Component Name", },state: { c__recordName: Any attribute which you want to pass, c__sc : Any attribute which you want to pass } }; event.preventDefault(); navService.navigate(pageReference); 

Write the below code in init of the component to which you want to navigate

var pageReference = component.get("v.pageReference"); var recordId =(pageReference.state.c__sc); var recordName = (pageReference.state.c__recordName); console.log('recordId'+recordId+'recordName'+recordName); 

Hope this will help you out.

Thanks

use the below component--https://developer.salesforce.com/docs/component-library/bundle/lightning:navigation/documentation

<lightning:navigation aura:id="navService"/> var navService = component.find("navService"); // Uses the pageReference definition in the init handler var pageReference = { type: "standard__component", attributes: { componentName: "Your Component Name", },state: { c__recordName: Any attribute which you want to pass, c__sc : Any attribute which you want to pass } }; event.preventDefault(); navService.navigate(pageReference); 

Write the below code in init of the component to which you want to navigate

var pageReference = component.get("v.pageReference"); var recordId =(pageReference.state.c__sc); var recordName = (pageReference.state.c__recordName); console.log('recordId'+recordId+'recordName'+recordName); 

Hi you can use the below code

use the below component--https://developer.salesforce.com/docs/component-library/bundle/lightning:navigation/documentation

<lightning:navigation aura:id="navService"/>

var navService = component.find("navService");

// Uses the pageReference definition in the init handler
var pageReference = { type: "standard__component", attributes: { componentName: "Your Component Name", },state: { c__recordName: Any attribute which you want to pass, c__sc : Any attribute which you want to pass } };

<lightning:navigation aura:id="navService"/>  var navService = component.find("navService"); // Uses the pageReference definition in the init handler  var pageReference = { type: "standard__component", attributes: { componentName: "Your Component Name", },state: {  c__recordName: Any attribute which you want to pass, c__sc : Any attribute which you want to pass } }; event.preventDefault();   navService.navigate(pageReference); 

Write the below code in init of the component to which you want to navigate

var pageReference = component.get("v.pageReference"); var recordId =(pageReference.state.c__sc); var recordName = (pageReference.state.c__recordName); console.log('recordId'+recordId+'recordName'+recordName);

var pageReference = component.get("v.pageReference"); var recordId =(pageReference.state.c__sc); var recordName = (pageReference.state.c__recordName); console.log('recordId'+recordId+'recordName'+recordName); 

Hope this will help you out.

Thanks

Hi you can use the below code

use the below component--https://developer.salesforce.com/docs/component-library/bundle/lightning:navigation/documentation

<lightning:navigation aura:id="navService"/>

var navService = component.find("navService");

// Uses the pageReference definition in the init handler
var pageReference = { type: "standard__component", attributes: { componentName: "Your Component Name", },state: { c__recordName: Any attribute which you want to pass, c__sc : Any attribute which you want to pass } };

 event.preventDefault(); navService.navigate(pageReference); 

Write the below code in init of the component to which you want to navigate

var pageReference = component.get("v.pageReference"); var recordId =(pageReference.state.c__sc); var recordName = (pageReference.state.c__recordName); console.log('recordId'+recordId+'recordName'+recordName);

Hope this will help you out.

Thanks

Hi you can use the below code

use the below component--https://developer.salesforce.com/docs/component-library/bundle/lightning:navigation/documentation

<lightning:navigation aura:id="navService"/>  var navService = component.find("navService"); // Uses the pageReference definition in the init handler  var pageReference = { type: "standard__component", attributes: { componentName: "Your Component Name", },state: {  c__recordName: Any attribute which you want to pass, c__sc : Any attribute which you want to pass } }; event.preventDefault();   navService.navigate(pageReference); 

Write the below code in init of the component to which you want to navigate

var pageReference = component.get("v.pageReference"); var recordId =(pageReference.state.c__sc); var recordName = (pageReference.state.c__recordName); console.log('recordId'+recordId+'recordName'+recordName); 

Hope this will help you out.

Thanks

Source Link
Sonal
  • 31
  • 2

Hi you can use the below code

use the below component--https://developer.salesforce.com/docs/component-library/bundle/lightning:navigation/documentation

<lightning:navigation aura:id="navService"/>

var navService = component.find("navService");

// Uses the pageReference definition in the init handler
var pageReference = { type: "standard__component", attributes: { componentName: "Your Component Name", },state: { c__recordName: Any attribute which you want to pass, c__sc : Any attribute which you want to pass } };

 event.preventDefault(); navService.navigate(pageReference); 

Write the below code in init of the component to which you want to navigate

var pageReference = component.get("v.pageReference"); var recordId =(pageReference.state.c__sc); var recordName = (pageReference.state.c__recordName); console.log('recordId'+recordId+'recordName'+recordName);

Hope this will help you out.

Thanks