Notifications

45 views

Description

Using 'ref_auto_completer=AJAXReferenceChoice' on a reference field when the number of choices is greater than the "glide.ui.max_ref_dropdown" system property (or the "max_ref_dropdown" dictionary attribute) does not work and generates an error, causing the reference icon to not go away on clearing the value. 

 

Steps to Reproduce

1. Open the sys_dictionary entry for cmdb_ci reference field on task ( /nav_to.do?uri=sys_dictionary.do?sys_id=151b1887db133300e89cf1471d9619b0 ).

2. Remove the existing attributes from the 'Attributes' field and add the following:
ref_ac_columns=sys_class_name,ref_ac_order_by=sys_class_name,ref_auto_completer=AJAXReferenceChoice,ref_contributions=task_show_ci_map;show_related_records

3. Save.

4. Open the task form.

5. Add any value to the cmdb_ci field. Notice the reference icon shows up.

6. Clear the value and observe that reference icon is still there.

Workaround

This problem is under review and targeted to be fixed in a future release. To receive notifications when more information becomes available, subscribe to this Known Error article by clicking the Subscribe button at the top right of this form.

As per design, the three conditions below need to be true for the reference field to not be displayed as a choice but to remain as a reference field:

  1. A reference field is used as a choice field by setting the "Choice List Specification > Choice" to either of the "Dropdown" options, and
  2. The "ref_auto_completer" attribute is set to "AJAXReferenceChoice", and
  3. The number of choices is greater than the system property "glide.ui.max_ref_dropdown" - which defaults to 25 - or the number of choices is greater than the field's dictionary attribute of "max_ref_dropdown".

Because of this, there is no benefit to specifying the "ref_auto_completer" as "AJAXReferenceChoice" when there are many options for the field. The "AJAXReferenceChoice" is better suited to a small number of choices or else the choice list would display beyond the bottom of the visible area.

As a workaround, set the "ref_auto_completer" to either "AJAXTableCompleter" (recommended for references to cmdb_ci) or "AJAXReferenceCompleter" depending on which UI style you prefer.

 


Related Problem: PRB1372854

Seen In

New York Patch 2
SR - IRM - Audit Management - New York 2019 Q3
SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - GRC Workbench - New York 2019 Q3
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - IRM - Risk Management - New York 2019 Q3
SR - IRM - Vendor Risk Management - Madrid 2019 Q1

Intended Fix Version

Paris

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-29 16:44:34
Published:2020-01-23