4 views

Description

The fields sys_user.preferred_language and sys_user.country have Max length 3. If these are updated through a client script to a NULL value, the dictionary truncates them as 'NUL'.

 

Steps to Reproduce

 

1) Log in to any instance as administrator.
 
2) Create an onSubmit Client Script on Incident: 
 
var user = new GlideRecord('sys_user');
user.get('06826bf03710200044e0bfc8bcbe5d8a'); // random user
user.mobile_phone = '234-566'; // a random field 
user.update();
 
3) Save and activate the Client Script.

4) Go to any incident and update the record.
 
5) Go to the sys_user record with sys_id=06826bf03710200044e0bfc8bcbe5d8a. Observe the preferred_language is set to the value 'NUL'.
 

Workaround

After carefully considering the severity and frequency of the issue, and the cost and risk of attempting a fix, it has been decided to not address this issue in any current or near future releases. We do not make these decisions lightly, and we apologize for any inconvenience. You can submit an Enhancement Request and Subscribe to this article to be notified in case of future updates.

As a workaround, update the sys_user record via a before/after insert Business Rule rather than a Client Script, for example:

Table = incident 
Advanced = true 
When = before / after 
Insert = true 
Script
var gr = new GlideRecord('sys_user'); 
gr.get(sys_id); 
gr.email = 'testing123@test.com'; 
gr.update(); 


Related Problem: PRB586274

Seen In

Berlin Patch 2 Hot Fix 2
Dublin EA 1

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-10-11 06:20:24
Published:2018-10-11