In Service Portal, "sn-record-picker" directive does not support a reference field (such as department)


This issue is with the "sn-record-picker" directive in the Service Portal. When you try and include a reference field (such as "department") in the "display-fields" parameter, the field that you specify doesn't render. When you include a non-reference field in the "display-fields" parameter (such as "user_name"), the widget renders as you would expect.

Steps to Reproduce

  1. Create a new blank widget in the Service Portal
  2. Replace the HTML Template with the contents from large_shopping_cart OOB:
    <sn-record-picker field="" table="'sys_user'" display-field="'name'" display-fields="'user_name'" value-field="'sys_id'" search-fields="'name'" page-size="100" ></sn-record-picker>

    large_shopping_cart Angular ng-template OOB:


  3. Save the widget and preview it.
  4. Note that the "user_name" field is displayed below the name of the user in the record picker.
  5. Replace the HTML Template with:
    <sn-record-picker field="c.requestedFor" table="'sys_user'" display-field="'name'" display-fields="'department'" value-field="'sys_id'" search-fields="'name'" page-size="100" ></sn-record-picker>
  6. Save the newly modified widget and preview it.
  7. Note that the "department" field does not display below the name of the user in the record picker



This issue is under review. To receive notifications when more information is available, subscribe to this Known Error article by clicking the Subscribe button at the top right of the article. If you are able to upgrade, review the Fixed In or Intended Fix Version fields to determine whether any versions have a planned or permanent fix.


Related Problem: PRB745484