Remove Close button from modal in Agent workspace

Shweta44
Tera Contributor

We have a custom Reassign case UI action in workspace. After upgrading to Utah, there is an extra close button came up at the footer of the modal. First it was not there in the Tokyo version. We have used g_modal.showframe method in the workspace client script to call the ui page url.

Shweta44_1-1690437378396.png

Now we don't want this extra close button at the footer. If anyone has an idea about how to remove it then please let us know.

Thank you.

6 REPLIES 6

Community Alums
Not applicable

Jagadeesh5
Tera Contributor

Hi Shweta,

     Did you got any solution for the issue? I need to do the same in our Configurable Woekspace.

Regards,

Jagadeesh

Alex Tod1
Kilo Sage

Hi @Shweta44,

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';
 }
});

 

 

Hi,

Did you get any solution for it?

 

Thanks