In Service Portal, "sn-record-picker" directive is not displaying reference field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 03:15 AM
Hi Community,
I am trying to use a reference type field as display-field property for sn-record-picker. However, i don't get any value displayed when i am using reference type variable. When i try with other type of the field, i am able to display the field value.
Please help me here in displaying the reference field for sn-record-picker.
- Labels:
-
Service Portal Development
- 2,507 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 03:23 AM
exmple here
https://community.servicenow.com/community?id=community_question&sys_id=15aa872ddb5cdbc01dcaf3231f96197a&view_source=searchResult
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2019 04:31 AM
Thanks for the reply, I did go through the details in the link.However, i didn't find any concrete solution or workwround for the issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2019 03:24 AM
Could you post the code, which you use and details about the table/field, which you want to display.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2019 04:36 AM
when I try with a non-reference field (u_case_status) in dispalay-field parameter , i get the records.
<sn-record-picker id="resolutionCheckBox" field="c.resoutionItem" placeholder="All" table="'u_aps_case_close_reason_mapping'" display-field="' u_case_status'"
value-field="'sys_id'" search-fields="'label'" page-size="100"
on-change="c.getResolutionValue()"
default-query="'u_case_type='+data.curCaseType+'^u_business_line='+data.curBL+'^u_case_status='+data.curStatus">
</sn-record-picker>
when I try with a reference field (u_case_close_reason) in display-field parameter , i get no records or only invisible records.
<div>
<sn-record-picker id="resolutionCheckBox" field="c.resoutionItem" placeholder="All" table="'u_aps_case_close_reason_mapping'" display-field="'u_case_close_reason'"
value-field="'sys_id'" search-fields="'label'" page-size="100"
on-change="c.getResolutionValue()"
default-query="'u_case_type='+data.curCaseType+'^u_business_line='+data.curBL+'^u_case_status='+data.curStatus">
</sn-record-picker></div>
The issue is that i am not able to display a reference field for sn-record-picker.