We're developing a lightning experience app. In the flow, the user can open up multiple subtabs within a main tab. For example, from the main Customer tab (in this example Richard Doyle), there is a Case subtab where you can click an "Order Search" button that opens up another subtab where you can search orders:

enter image description here

On that subtab a list of orders will come up in the search results - every time you click on one of these results it opens up a new Order Detail subtab:

enter image description here

The problem is: it keeps opening new tabs even if you keep clicking on the same order number. Is there a way to prevent opening the same duplicate tab again? Ideally, if you were looking at the search results and clicked an order number you already clicked before, it would simply place the focus on the already opened Order Detail subtab instead of opening a new one. Is there some kind of way to manage these subtabs, search through them, close multiple specific ones, etc.?

Note: these subtabs are currently being opened with something similar to the following code:

const pageRef = {
    type: 'standard__component',
    attributes: {
        componentName: 'c:OrderDetails'
    state: {
        c__omsOrderId: omsOrderId,
        c__storeId: enterpriseCode,
        c__orderType: this.orderType


1 Answer 1


From my experience and as far as I know, we use Aura component instead of LWC. Aura supports lightning:workspaceAPI so you can customize your tab behavior. We have successfully done this using Aura component. So in case you still have a chance to change it to Aura, I think I am able to help you with it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .