If you set a Glide List type field to read-only via UI Policy, client script, dictionary entry, or ACL, if the value for this field is updated via scripts, it does not get saved when the form is submitted.
Steps to Reproduce
Make sure the glide list type field Watch List is added to an existing form layout, for example, Incident.
Create a new UI policy to set the Watch List field as Read Only in the UI Policy Actions.
For more information, see the product documentation topic Add a UI policy.
Create an onLoad client script with the following code below so that the script sets the Watch list field to Abel Tuter upon form load.
var valueArray = new Array("62826bf03710200044e0bfc8bcbe5df1");
var labelArray = new Array("Abel Tuter");
g_form.setValue("watch_list", valueArray, labelArray);
Open an existing incident, make a small change, and save the form.
The Watch List field remains empty.
Use the following line in a client script/UI policy for fields that are affected. The field will still be read-only per the read-only and disabled class attributes, but the issue will be resolved.
Related Problem: PRB1181032