- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2017 06:43 AM
I have an onBefore business rule that limits user query results based on which domain a user exists in. This rule interferes with trying to impersonate back to myself from a non-admin user (causes me to have to logout and log back in as myself).
Is there a condition I can write that will ignore this business rule if trying to impersonate?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2017 07:21 AM
The working solution I used was posted on here but must have been removed.
I added !gs.getImpersonatingUserName() to the condition line in my Business Rule script and am now able to successfully impersonate back to myself from a non-admin user.
Thanks all!
P.S. That gs.getSession().isImpersonating() looks like it will come in handy down the line too so thanks for that as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2017 07:54 AM
I'm running Helsinki FYI.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2017 09:06 AM
My apologies, I saw ctomasi's post after I submitted mine and deleted it because his code seemed more functional for your purpose...
I'm glad it helped. May the force of Monday be with you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2024 06:42 AM
Doesn't work anymore. Try GlideImpersonate().isImpersonating()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2018 08:31 AM
hi nathan ,
Actually there are multiple user account.based on some conditions , i want only one account is shown while impersonation.
for this I created onbefore query business rule.
and then check if(GlideImpersonate().isImpersonating()){
}
where do i need to include my conditions like vip=false ?
Can you please help!