If the fields sys_user.preferred_language and sys_user.country are updated to a NULL value, the dictionary interprets the value as a string and truncates it to 'NUL'.


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 
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'.


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 
var gr = new GlideRecord('sys_user'); 
gr.email = 'testing123@test.com'; 

Related Problem: PRB586274