0

I have a button which redirects to the user detail page on clicking it, as sub-tab in lightning console. I want to do the same if the record owner is a queue. I tried with the queue URL but nothing happens.

var workspaceAPI = component.find("workspace");
    var isInConsole = false;
    var urlStr = 'lightning/setup/Queues/page?address=/p/own/Queue/d?id=00GXXXXXXXXXXXX';
    workspaceAPI.isConsoleNavigation().then(function(response) {
        isInConsole = response;
        if(isInConsole == true){
            workspaceAPI.getFocusedTabInfo().then(function(response) {
                var focusedTabId = response.tabId;
                if(response.isSubtab){
                    focusedTabId =  response.parentTabId;   
                }
                workspaceAPI.openSubtab({
                    parentTabId: focusedTabId,
                    url: urlStr,
                    focus: true
                });
            })
            .catch(function(error) {
                console.log(error);
            });

        }
        else{
            window.open(urlStr,'_blank');
        }
    })
    .catch(function(error) {
        console.log(error);
    });

Can anyone please help me out with this.

1 Answer 1

1

You have to change URL from

var urlStr = 'lightning/setup/Queues/page?address=/p/own/Queue/d?id=00GXXXXXXXXXXXX';

to

var urlStr = '/p/own/Queue/d?id=00GB00000042vpz&setupid=Queues';

It worked for me

1
  • thanks it worked. But I want to open queue detail page in sub-tab, instead, the above url opens it in a new workspace tab.
    – sfdcOwl
    Commented Feb 24, 2020 at 7:11

You must log in to answer this question.

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