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.
Why does creation of software entitlement give "Cannot read property 'table' of null" error after activating SAMP? - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Why does creation of software entitlement give "Cannot read property 'table' of null" error after activating SAMP?
KB0696925

Why does creation of software entitlement give "Cannot read property 'table' of null" error after activating SAMP?


540 Views Last updated : Apr 29, 2025 public Copy Permalink
KB Summary by Now Assist

Issue

Symptoms


Navigate to Software Asset>Software entitlement, create new. On submit you will receive error:

#####################################

onSubmit script error: TypeError: Cannot read property 'table' of null:

function onSubmit() {
var purchased_rights = g_form.getValue('purchased_rights');
var active_rights = g_form.getValue('rights');
var list = GlideList2.getByName('alm_license.samp_upgraded_entitlement.licensed_by');
var row = list.table.getElementsBySelector('tr.list_row');
var list_row_sysId;
var total_rights = 0;
if (purchased_rights < 0) {
g_form.showErrorBox('purchased_rights',getMessage('Please enter positive number'),true);
g_form.modified = false;
return false;
}
for (var num_rows = 0; num_rows < row.length - 1; num_rows++) {
list_row_sysId = row[num_rows].getAttribute('sys_id');
total_rights = total_rights + parseInt(list.getCell(list_row_sysId, 'num_rights').textContent);
if (total_rights > purchased_rights) {
g_form.showErrorBox('purchased_rights',getMessage('Do not have enough rights'),true);
g_form.modified = false;
return false;
}
if (active_rights != 0 && active_rights < total_rights) {
g_form.showErrorBox('rights','Do not have enough active rights',true);
g_form.modified = false;
return false;
}
}
return true;
}

#######################################

 

Cause


The software entitlement form is missing a form section "Upgraded entitlements". This form section is being accessed by the above code.

The upgraded entitlement section is part of file sys_ui_form_sections_08fdf65d1b3210002502fbcd2c071311

Resolution


  1. Navigate to sys_update_version table, please search for the file sys_ui_form_sections_08fdf65d1b3210002502fbcd2c071311
  2. Identify the file that is created on the same day as the SAMP activation
  3. Open the record, revert to this version of the file by clicking the related link "revert to this version"

 


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.