0

I have a custom tab of a LWC, I wanna to open this custom tab when the button, that is located in the detail record, is clicked, like a quick action

I tried this:

<aura:component 
    implements="force:appHostable, flexipage:availableForAllPageTypes, flexipage:availableForRecordHome, force:hasRecordId, forceCommunity:availableForAllPageTypes, force:lightningQuickAction">
    <aura:handler name="init" action="{!c.navigateToeDiscoverySearchCmp}" />
</aura:component>

Controller:

({
    navigateToeDiscoverySearchCmp : function(component, event, helper) {
        var evt = $A.get("e.force:navigateToComponent");
        evt.setParams({
            componentDef : "c:startSale",
        });
        evt.fire();
    } 
})

The LWC component name is startSale, but this doesn't work and I don't know if this will open like I wish, that is like this: enter image description here

When I click the button, the error is this: enter image description here

1
  • Can you post startSale LWC code ? Error seems to be in connectedCallback.
    – Rohit
    Mar 17 at 7:26

0

You must log in to answer this question.

Browse other questions tagged .