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.
isEditableField and isReadOnly return incorrectly for true/false (boolean) checkboxes because class="readonly" appears in the hidden input type for the object on the form - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • isEditableField and isReadOnly return incorrectly for true/false (boolean) checkboxes because class="readonly" appears in the hidden input type for the object on the form
KB0639059

isEditableField and isReadOnly return incorrectly for true/false (boolean) checkboxes because class="readonly" appears in the hidden input type for the object on the form


2492 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Description

a checkbox that is writable on the form may return incorrectly for an isEditableField check.

Steps to Reproduce

 

1) Create a table with two boolean fields boolA and boolB
2) Create a write ACL on yourtable.boolA with admin overrides = false and script: answer=false
3) navigate to your table and notice that boolA is read only and boolB is not read only.
4) Using the console in your debugger tools, set your frame to gsft_main and exeute the following:
var control = g_form.getControl('boolB');
var fieldGE = g_form.getGlideUIElement('boolB');
g_form.isEditableField(fieldGE, control);
g_form.isReadOnly(fieldGE,control);

Expected: isEditableField should return true, isReadOnly should return false.
Actual: isEditableField returns false, isReadOnly returns true.

Workaround

Set the actual read only checkbox to read only with a client side method like UI Policy or Client Script.


Related Problem: PRB1193118

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.