Remove additional 'Close' button from g_modal in service operations workspace

Shree123
Tera Contributor

Hello experts,

I am rendering a UI page in workspace using 

g_modal.showFrame.
I am getting a 'Close' button in the pop-up by default, which I want to remove/hide.
Any lead on how to achieve that?
Shree123_0-1714142660918.png

 

This is a simple line of code:

function onClick() {
    var incidents = g_list.getChecked().toString();

    function openPopup() {
        var url = "XXX.link_to_major_incident.do?sysparm_incident_ids=" + incidents + "&sysparm_stack=no";
        g_modal.showFrame({
            title: "Choose a Major Incident",
            url: url,
            size: 'sm',
            height: 100,
            autoCloseOn: 'URL_CHANGED',
            callback: function(ret, data) {
                g_list.refresh();
            }
        });
    }
    openPopup();
}
7 REPLIES 7

Amitoj Wadhera
Kilo Sage

Hi @Shree123 

 

Please refer to the solution : https://www.servicenow.com/community/developer-forum/remove-close-icon-on-the-dialog-window/m-p/1535...

 

If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
Thanks,
Amitoj

Hi @Amitoj Wadhera  
Please refer to my code above in the query, I am not using glidemodal.

James Chun
Kilo Patron

Hi @Shree123,

 

Can you check if the 'cancel' button is part of the UI Page?

If so, can you just remove it from the UI Page instead if it's not being used anywhere else?

 

Cheers

 

Hi @James Chun 
No it's not a part of UI Page.