[SalesForce] alternative for WorkspaceApi in LWC

Background & The Problem

We have a custom grid lwc which i am using to display data from two different objects (EmailMessage & CustomObject). Now, I want to navigate the user to a new tab with Contact as Primary tab and Case as Sub-tab when they click on CaseNumber. I am able them to navigate to a new tab (Case) by using NavigationMixin.Navigate (code shown below) but not sure how to open it as a sub-tab without using workspaceapi since LWC doesn't support it yet.

handleGenericClick(){
        this[NavigationMixin.Navigate]({
            type: 'standard__recordPage',
            attributes: {
                recordId: this.caseId,
                actionName: 'view'
            }
        });
    }

Best Answer

I think the only way to achieve this behaviour would be to wrap your component in an Aura wrapper and handle interaction with the workspace API there. The LWC component should bubble up an event to its Aura wrapper when the workspace API needs to be used.

Related Topic