You need to sign in to do that
Don't have an account?
Rahul Rana 32
How to navigate to a record by clicking on the link in lightning:tile ?
Hi Salesforce Lightning Experts,
I am trying to navigate to a record by clicking on the link in lightning:tile as shown below:
I am trying to call the JS controller from 'href' attribute and trying to use <lightning:navigation/> to navigate to the record as shown below But it is not working :
<lightning:navigation aura:id="navigation"/>
<lightning:tile label="{!emp.Name}" href="{!c.navigateToAlert}">
To me, it looks like we cannot call JS controller from href. Can someone explain a way to navigate to the particular record. It is to be kept in mind that I'm showing multiple lightning:tiles by iterating over a list. So navigation will be dynamic based on the record we are clicking.
Kindly suggest. Thanks in advance.
I am trying to navigate to a record by clicking on the link in lightning:tile as shown below:
I am trying to call the JS controller from 'href' attribute and trying to use <lightning:navigation/> to navigate to the record as shown below But it is not working :
<lightning:navigation aura:id="navigation"/>
<lightning:tile label="{!emp.Name}" href="{!c.navigateToAlert}">
To me, it looks like we cannot call JS controller from href. Can someone explain a way to navigate to the particular record. It is to be kept in mind that I'm showing multiple lightning:tiles by iterating over a list. So navigation will be dynamic based on the record we are clicking.
Kindly suggest. Thanks in advance.
https://developer.salesforce.com/docs/component-library/bundle/lightning:navigation/documentation