Notifications

17 views

Description

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
<instancename>/sys_dictionary.do?sys_id=2d6d1d7c74e0330078509adcc48c874d

2. Create an onLoad client script on Incident table
Name: <name>
Table: Incident
Type: onLoad
Script:
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'

Workaround

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

Intended Fix Version

Orlando

Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-01-10 07:03:57
Published:2020-01-10