54 views

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

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-09-20 04:54:54
Published:2018-09-20