- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 08:26 PM - edited 12-12-2024 09:38 PM
How to configure the "sys_user" reference field in the impersonate modal to search with last name as well as first name when searching for a impersonate user.
When a user is impersonating someone we want to give the users the ability to search with the last name as well as first name when trying to search for an user.
Thank you for your help
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 09:44 PM
If you're using the impersonation feature in the Service Portal, such as accessing /esc
, clicking the profile icon, selecting the display menu, and then choosing "Impersonate," here's how you can allow searching by first and last name.
Steps:
-
Ensure you're in the Global Scope.
-
Edit the "Impersonate User" widget to enable additional search fields. You can access it at this URL:
[your instance]/sp_config?id=widget_editor&sys_id=b338d7a7532120101865ddeeff7b12ae&spa=1
-
Update the
sn-reference-picker
in the template. Locate thesearchField
property and change it as follows:Original:
searchField: 'name;sys_id;user_name;'
Updated:
searchField: 'name;sys_id;user_name;first_name;last_name;'
-
Important: This is an out-of-box (OOB) widget, and the ServiceNow team may update this file in the future. To make your changes upgradable:
-
Go to:
[your instance]/nav_to.do?uri=sp_widget.do?sys_id=b338d7a7532120101865ddeeff7b12ae
-
Right-click the header and select Show Latest Update.
-
Right-click the header again and choose Configure Form Layout.
-
Add the Replace on Upgrade field to the form layout.
-
Check the Replace on Upgrade checkbox and save the record.
-
-
Document your changes. Keep a note of the modifications you made so you can reapply them if an upgrade overwrites the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2024 12:29 PM
Hi Shrikarvs,
it is not possible to achieve the same change for the platform view, you can't customize the Polaris App Shell. But you could search by using the wildcard "*lastNameHere" in platform to match that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 09:32 PM
Hi
User can achieve this by using wildcard (*) to search in the Impersonate user modal.
For example, *lastname
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 09:36 PM
yes, we can do that as well but we wanted to configure the user reference field to do It automatically without wildcard(*) .
although, thanks for the help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 09:44 PM
If you're using the impersonation feature in the Service Portal, such as accessing /esc
, clicking the profile icon, selecting the display menu, and then choosing "Impersonate," here's how you can allow searching by first and last name.
Steps:
-
Ensure you're in the Global Scope.
-
Edit the "Impersonate User" widget to enable additional search fields. You can access it at this URL:
[your instance]/sp_config?id=widget_editor&sys_id=b338d7a7532120101865ddeeff7b12ae&spa=1
-
Update the
sn-reference-picker
in the template. Locate thesearchField
property and change it as follows:Original:
searchField: 'name;sys_id;user_name;'
Updated:
searchField: 'name;sys_id;user_name;first_name;last_name;'
-
Important: This is an out-of-box (OOB) widget, and the ServiceNow team may update this file in the future. To make your changes upgradable:
-
Go to:
[your instance]/nav_to.do?uri=sp_widget.do?sys_id=b338d7a7532120101865ddeeff7b12ae
-
Right-click the header and select Show Latest Update.
-
Right-click the header again and choose Configure Form Layout.
-
Add the Replace on Upgrade field to the form layout.
-
Check the Replace on Upgrade checkbox and save the record.
-
-
Document your changes. Keep a note of the modifications you made so you can reapply them if an upgrade overwrites the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 09:57 PM - edited 12-12-2024 09:58 PM
Thank you for your help, It is working as expected on the ESC portal. Is it possible to achieve the same for the platform view.
once again thank you so much for your help.