Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Copy of the OOB kb_knowledge 'Delete' button generates the error "Uncaught TypeError: Cannot read property 'GlideModal' of null" - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Copy of the OOB kb_knowledge 'Delete' button generates the error "Uncaught TypeError: Cannot read property 'GlideModal' of null"
KB0779189

Copy of the OOB kb_knowledge 'Delete' button generates the error "Uncaught TypeError: Cannot read property 'GlideModal' of null"


3354 Views Last updated : Jul 24, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

After copying the kb_knowledge Delete button and clicking on the copy, it does nothing and generates the error "Uncaught TypeError: Cannot read property 'GlideModal' of null".

Steps to Reproduce

  1. Copy the Delete UI Action for the kb_knowledge table
  2. Edit an article
  3. Open a developer console in your browser
  4. Click on the copy of the Delete UI Action
  5. Observe the error message "Uncaught TypeError: Cannot read property 'GlideModal' of null"

Cause

This is expected behavior because the UI action is run in strict mode, which causes the runtime issue. Basically, when running in strict mode you are not allowed to access any DOM elements. In particular, this includes the use of window.

Many of the base system scripts are allowed to run in non-strict mode, but by copying the existing UI action you are forced into strict mode.

Resolution

There are several ways to address this issue:

  1. The correct way to re-write this script to run in strict mode would be:
    var dialogClass = (typeof GlideModal !== 'undefined') ? GlideModal : GlideDialogWindow;
  2. New client-scripts are run in strict mode, this removes direct access to the DOM, jQuery, prototype, and the window object.
    • To turn this off this on a per-script basis
      1. Configure this form to add the "Isolate script" field
      2. Disable the field.
    • To disable this feature for all new globally-scoped client-side scripts set the system property "glide.script.block.client.globals" to false. If this property is not present in your 'System Properties > All Properties' [sys_properties] table, you can add it:
      1. Go to the sys_properties.list
      2. Click New
      3. Populate the form
        • Name: glide.script.block.client.globals
        • Type: true|false
        • Value: false

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.