0

I need to refresh the workspace tab after closing the current subtab. But it's not happening as expected. Below is my code.

var workspaceAPI = component.find("workspace");
                workspaceAPI.getFocusedTabInfo().then(function(response) {
                    var focusedTabId = response.tabId;
                    workspaceAPI.closeTab({tabId: focusedTabId});
                    workspaceAPI.refreshTab({tabId: focusedTabId});
                })
                .catch(function(error) {
                    console.log(error);
                });
                component.find("NotifLib").showToast({
                    "variant": "Success",
                    "title": "Success",
                    "message": 'Record details has been successfully updated'
                });

Here the sub tab gets closed and the toast message is displayed. But the primary tab is not refreshed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.