How to close upper tab?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 07:43 AM
In this screenshot, there are two sets of tabs, upper and lower. Is it possible to close the upper tab from within a UI action? I can only figure out how to close the lower tab.
- Labels:
-
Agent Workspace
-
Multiple Versions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2022 07:51 AM
Hi,
The UI Action would apply the client script to the specific table/record that brought in the UI Action. Then using the follow script (which I'm sure you're using now) is how you'd close it: https://docs.servicenow.com/bundle/rome-servicenow-platform/page/administer/workspace/task/close-tab...
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-20-2023 11:39 PM
Hello Allen.
Could you please provide here the example of a script to close a tab on Workspace?
Unfortunately, there is no possible to browse the page under the link that you provided
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 12:59 AM
Hello Dustin.
Could you please share how to close lower and upper tabs on Workspace if you already figured it out?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2024 04:23 AM
We can do it by dispatching "SCREEN_STATUS_CHANGED" event with a payload { status: "closed" }
Add a new dispatched event in Body component named "SCREEN_STATUS_CHANGED" and add payload using advanced flag as "status" as string.
On your event handling for the button, add SCREEN_STATUS_CHANGED event with the payload status=closed and save it.
Now when you click on the button, it will close that tab.
Please mark as helpful if it answers your question.