Extra close button is displayed by default while using g_modal.showframe()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 04:39 AM - edited 02-26-2024 04:41 AM
I have created UI page and calling it in UI Action Workspace client script, glide dilague window has close button by default by the system.
I have used g_modal.showframe method in the workspace client script to call the ui page url. Is there somewhere I can go to remove it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 04:53 AM
Hi @Narayana RC
Try setting show_close to false.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 06:10 AM - edited 02-26-2024 06:11 AM
tried it by adding show_close into g_modal.showFrame() but its not working as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 06:22 AM
Hi @Narayana RC
Would you mind sharing the script or providing a screenshot for additional reference?
Try this Fix :
To remove the Close button from a modal in the Agent Workspace, you can follow these steps:
1. Navigate to the Agent Workspace.
2. Open the modal where you want to remove the Close button.
3. Right-click on the modal and select "Inspect" to open the browser's Developer Tools.
4. In the Elements tab, find the HTML code for the Close button. It should be something like
5. Note down the class or ID of the close button.
6. Now, navigate to System UI > UI Pages in ServiceNow
7. Find the UI Page for the Agent Workspace
8. In the Client Script section, add this script:
addLoadEvent(function() { var closeButton = document.querySelector('.close'); //replace '.close' with the class or ID you noted down if(closeButton) { closeButton.style.display = 'none'; } });
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thank you!
Subhashisr7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2024 08:33 AM