Unable to disable parent window operations even though a modal window is displayed.

Tepp
Tera Expert

Dear Experts,

I would like to create a UI action that displays a modal window using GlideDialogForm, but some parts of the parent window are still operable.

Are there any points for improvement with the following script or UI action settings? I would appreciate your advice.

function openFormInModal() {
    var dialog = new GlideDialogForm('New Record', 'u_dotc', function(actionName, sys_id, tableName, displayValue) {
        if (actionName === 'submit') {
            alert('Record created/updated: ' + displayValue);
        }
    });

    dialog.setTitle('New Record');
    dialog.setSysID('-1'); 
    dialog.render();
}



スクリーンショット 2025-06-09 104424.png

The area marked in red is the part that can still be operated.

 

スクリーンショット 2025-06-09 104759.png

 

Thank you very much.

Best regards,
Tepp

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@Tepp 

not possible with GlideModal or GlideDialogWindow.

When you use either of the options the modal takes the precedence and user can't interact with the main form.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hi @Ankur Bawiskar 

I want to disable the operation not only on the main form, but also on all the areas in the red box.
The issue is that it is a modal window, but it can be manipulated.

Tip: I have changed to GlideModalForm.

Best regards,
Tepp

スクリーンショット 2025-06-09 124628.png

 



@Tepp 

yes it's possible using GlideModalForm, but what's the business requirement to allow users to enter form fields using modal and not using the OOTB form?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar 

The business requirement is to control the user from performing any other operation until the form is completed.
Therefore, we have been instructed to display the form in a modal window.
*The modal window is displayed from a UI action in the related list.

Best regards,
Tepp