0

Having an interesting issue that I can't find any documentation on. I have an Aura component overriding the New action of a custom object. Inside the Aura Component is a child LWC, example:

<aura:component implements="lightning:actionOverride,force:hasRecordId,lightning:isUrlAddressable">
    <c:childLWC onclose="{!handleClose}"></c:childLWC>
</aura:component>

Inside the child LWC, I'm dispatching a custom close event when clicking the "Cancel" button:

const closeEvnt = new CustomEvent('close');
this.dispatchEvent(closeEvnt);

and in the Aura override, redirecting back to the Account page with NavService:

handleClose : function(component, event, helper) {
    var pageReference = {
        type: 'standard__recordPage',
        attributes: {
            recordId: accountId,
            actionName: 'view'
        },
        state: {
            nooverride: '1'
        }
    };
    navService.navigate(pageReference, true);
}

This all works, taking me back to the Account page/Accounts Nav Item, but the "Temporary" Nav Item with the Aura Override that was opened when I pressed "New" doesn't close.

enter image description here

The only documentation I can find is for Workspace API which is related to Console. I am just using a standard lightning app. I can't figure out how to close this temporary nav item.

0

You must log in to answer this question.