How to use Lightning:navigation to navigate another component

Use: We use lightning:navigation component to navigate custom component.



new Lightning Navigation

Short description: Using lightning:isUrlAddressable ( add new interface in Summer 18 release ) interface , we can handle which Lightning component can be opened.Usually lightning:navigation component generate a URL and navigate that URL using navigate() function.

Example :

5 comments on “How to use Lightning:navigation to navigate another component”

  • Anil says:

    Hello thanks for your article ,the same logic is not working for custom object do i need to do any adaptation?

    • Nigam says:

      Try this code for recordPage navigation

      var navLink = component.find("navLink");
      var pageRef = {
      type: 'standard__recordPage',
      attributes: {
      actionName: 'view',
      objectApiName: 'Job__c',
      recordId : '0hj7FXXX51uq5QAA' // change record id.
      navLink.navigate(pageRef, true);

  • amrita says:

    where are the codes for this?

  • Subba Reddy says:

    I have one scenario when i click on image icon, i want to open Potential Duplicates(This is standard component) page.
    Can you please suggest me on this ASAP it’s business critical if you give response it will help me alot. thanks in adavance.

  • SRK says:

    Thank you!It’s working properly 🙂

Comments are closed.

Find Out How We Can Help

If you're ready to find out more about how SimplusLabs can help energize your workers, your customers, and your business with a different experience, let's talk.