Description
Setting the value of a List field (glide_list) with a record that is filtered via a before query business rule will cause the field to be blank because ElementGlideListAjax returns no display values.
Steps to Reproduce
-
Create a new onLoad client script on a table that has a List field.
g_form.setValue("watch_list", "6816f79cc0a8016401c5a33be04be441,62826bf03710200044e0bfc8bcbe5df1,"); //sys_id for system admin and abel tuter.
-
Set the sys_user record for abel tuter to active = false.
-
Impersonate an ITIL user to trigger the user query business rule and filter out the record for abel tuter.
-
Go to any incident record.
Expected behavior: The Watch List field should be set with the user System Administrator because the user cannot see the Abel Tuter record).
Actual behavior: The Watch List field is blank.
Workaround
Make sure that the sys_id's that are being used are not deactivated and can be read by the end user.
Related Problem: PRB1242066