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.
Empty HTML fields always get captured by getChangedFieldNames - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • Empty HTML fields always get captured by getChangedFieldNames
KB0692495

Empty HTML fields always get captured by getChangedFieldNames


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

Description

When an HTML field is present in form layout and it has an empty/NULL value, GlideScriptRecordUtil.getChangedFieldNames function always returns a value that includes the HTML field, even though no changes has been made.

The issue started to occur in Jakarta. The scenario works as expected in Istanbul.

Steps to Reproduce

1/ Create a Business Rule
table: Problem
advanced: true
when: before
update: true
script:
(function executeRule(current, previous /*null when async*/) {

var gru = GlideScriptRecordUtil.get(current);
var changedFields = gru.getChangedFieldNames();
gs.log(changedFields,"testlog");

})(current, previous);

2/ Go to any Problem record which has some Description.
3/ Update the Short Description and Save (while the Description isn't empty) .
-- Go to <instancename>/syslog_list.do?sysparm_query=source%3Dtestlog
The latest log's message is [short_description]

4/ Clear the Description field and Save.
-- Go to <instancename>/syslog_list.do?sysparm_query=source%3Dtestlog
The latest log's message is [description]

5/ Update the Short Description again and Save(this time the Description is empty) .
-- Go to <instancename>/syslog_list.do?sysparm_query=source%3Dtestlog
Actual result: The latest log's message is [short_description, description]
Expected result: The latest log's message is [short_description]

6/ Save the record without updating any field.
-- Go to <instancename>/syslog_list.do?sysparm_query=source%3Dtestlog
Actual result: The latest log's message is [description]
Expected result: There shouldn't be any log printed

Workaround

This issue is under review. To receive notifications when more information is available, subscribe to this Known Error article by clicking the Subscribe button at the top right of the article. If you are able to upgrade, review the Fixed In field to determine whether any versions have a permanent fix.


Related Problem: PRB1294141

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.