function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arun MKArun MK 

How to navigate from a lightning web component to a tab within a lightning record detail page

Hi, 

I have a LWC added to Lightning Record Detail Page which has some buttons. On Click of these buttons, I want to navigate to the tabs inside a lightning record detail page.

User-added image

When the User clicks on the Fix Quote Contract Mismatches button, I want to navigate to the Fix Quote Contract Mismatches tab.

I am not sure if this is possible. But if anyone got any idea, please let me know.

David Zhu 🔥David Zhu 🔥
You can do the following in js controller.
1. add  line: 
     import { NavigationMixin } from 'lightning/navigation';

2. in the button method, add lines:
 
navigateToObjectHome() {
        // Navigate to the Object home page
        this[NavigationMixin.Navigate]({
            type: 'standard__objectPage',
            attributes: {
                objectApiName: 'yourobjectname__c',   //replace with Fix Quote Contract Mismatch object name
                actionName: 'home',
            },
        });
    }