Hi I have created a custom tab on the opportunity flexipage named as "Oferta"

as per the req i need to navigate to that tab instead of default summary page of the record as shown in the image enter image description here

can someone help me out how to navigate to this custom tab from Lightning Web component on the standard object Opportunity"

below is my code:

            type: 'standard__recordPage',
            attributes: {
                recordId: this.opptyrecordId,
                objectApiName: 'opportunity',
                actionName: 'view'

You can use standard__navItemPage (Navigation Item Page Type) with lightning:navigation here. Refer to the documentation for pageReference Types those are utilized with the component for details. From documentation:

Navigation Item Page Type

A page that displays the content mapped to a CustomTab. Visualforce tabs, Web tabs, Lightning Pages, and Lightning Component tabs are supported.

Your navigation should look like as below:

"type": "standard__navItemPage", "attributes": { "apiName": "MyCustomTabName" // replace with the API name of your custom tab
} }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.