Comments on: Direct User Impersonation From a User Record https://servicenowguru.com/ui-actions-system-ui/direct-impersonation-user-record/ ServiceNow Consulting Scripting Administration Development Thu, 07 Mar 2024 18:02:45 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Mark Stanger https://servicenowguru.com/ui-actions-system-ui/direct-impersonation-user-record/#comment-7929 Mon, 07 Nov 2016 11:40:35 +0000 https://servicenowguru.wpengine.com/?p=3080#comment-7929 In reply to Dinesh.

That points to a specific UI page that ServiceNow uses to handle the impersonation.

]]>
By: Dinesh https://servicenowguru.com/ui-actions-system-ui/direct-impersonation-user-record/#comment-7928 Mon, 07 Nov 2016 11:09:53 +0000 https://servicenowguru.wpengine.com/?p=3080#comment-7928 what is “sys_id=b071b5dc0a0a0a7900846d21db8e4db6” in the above script

]]>
By: Paula Cullen https://servicenowguru.com/ui-actions-system-ui/direct-impersonation-user-record/#comment-7927 Tue, 20 Dec 2011 15:32:31 +0000 https://servicenowguru.wpengine.com/?p=3080#comment-7927 In reply to Mark Stanger.

If you just remove and readd the single quotes around ‘admin’, the issue goes away.

]]>
By: Andreas https://servicenowguru.com/ui-actions-system-ui/direct-impersonation-user-record/#comment-7926 Mon, 08 Aug 2011 21:21:25 +0000 https://servicenowguru.wpengine.com/?p=3080#comment-7926 In reply to Mark Stanger.

thx – copying didn’t work but typing did – great script!

]]>
By: Mark Stanger https://servicenowguru.com/ui-actions-system-ui/direct-impersonation-user-record/#comment-7925 Mon, 08 Aug 2011 20:54:10 +0000 https://servicenowguru.wpengine.com/?p=3080#comment-7925 In reply to Andreas.

It’s probably just a copy/paste issue. I’ve re-added the code to the article above so you can try copying it again and see if that helps. If it doesn’t, then you can simply type the same information directly into the ‘Condition’ field manually to avoid the error.

]]>
By: Andreas https://servicenowguru.com/ui-actions-system-ui/direct-impersonation-user-record/#comment-7924 Mon, 08 Aug 2011 17:04:25 +0000 https://servicenowguru.wpengine.com/?p=3080#comment-7924 When saving the UI Action there is a JavaScript check taking part for the condition field which complains about the brackets for the role check function (“JavaScript parse error at line (1) column (12) problem = illegal character”).

Is there a way to avoid this error without having the dictionary entry for that field changed?

]]>
By: mathew https://servicenowguru.com/ui-actions-system-ui/direct-impersonation-user-record/#comment-7923 Wed, 04 May 2011 09:13:19 +0000 https://servicenowguru.wpengine.com/?p=3080#comment-7923 that was awesome

]]>
By: Mark Stanger https://servicenowguru.com/ui-actions-system-ui/direct-impersonation-user-record/#comment-7922 Fri, 10 Dec 2010 10:14:30 +0000 https://servicenowguru.wpengine.com/?p=3080#comment-7922 In reply to Koen van Dooren.

Thanks for the comment. While that’s possible, it’s also server-side javascript so it does do the impersonation, but it doesn’t automatically refresh the browser so that you know you’re actually impersonating somebody. The other benefit to the client-side solution shown above is that it includes a confirmation prompt so that you don’t automatically impersonate a user by accidentally clicking a button.

]]>
By: Koen van Dooren https://servicenowguru.com/ui-actions-system-ui/direct-impersonation-user-record/#comment-7921 Fri, 10 Dec 2010 08:59:13 +0000 https://servicenowguru.wpengine.com/?p=3080#comment-7921 Sounds complicated. What about the UI action having just the following script:

session.onlineImpersonate(current.sys_id);

]]>