When a 'List' (glide_list) field set as Read only at dictionary level and set via a script, it displays 'undefined' in form layout.
This issue is only visual, actual value is getting saved into the field

Steps to Reproduce

1. Create a readonly List field. i.e. Set 'work_notes_list' field of task table as readonly

2. Create an onLoad client script on Incident table
Name: <name>
Table: Incident
Type: onLoad
function onLoad() {
g_form.setValue('work_notes_list', '62826bf03710200044e0bfc8bcbe5df1'); //Abel Tuter's sys_id

3. Go to any Incident record and check 'Work notes list' field

Actual behavior: Field displays 'undefined'
Expected behavior: Field displays 'Abel Tuter'


There are two possible workarounds;

1) Instead of using "g_form.setValue(<field>, <sys_id(s)>);" format, please use "g_form.setValue(<field>, <sys_id(s)>, <label(s)>);" format. 

2) Set the field as readonly via a UI Policy instead of setting it at dictionary level

Related Problem: PRB1350605

Seen In

SR - Security - Support Common - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3

Fixed In


Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-11-16 10:08:36