- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 07:50 AM
I am getting an Error Message: Illegal access to method isImpersonating() in class com.glide.sys.GlideSession
I started getting this error message from a business rule I have created
Please help me fix the issue.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2020 08:01 AM
Hi Rajasekhar,
you can use that in scoped app BR on incident table for example
Condition: Work notes changes
Script below:
var isImpersonator = gs.getSession().isImpersonating();
if(isImpersonator){
gs.addErrorMessage('You are not allowed to edit work notes as you are impersonator');
current.setAbortAction(true);
}
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2020 09:58 AM
Hi,
Any update on this?
Can you mark my answer as ✅ correct, 👍 helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2020 10:33 AM
Hi Rajasekhar
You can take help of the below link but as Ankur Said this might be the case that you are using this method in scoped app.
https://hi.service-now.com/kb_view.do?sysparm_article=KB0694685
also check below widget codes how to use this isImpersonate class
Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2020 01:09 AM
Hi,
this line of code should work in scoped app; I think it gives issue for global scope
what you want to achieve here?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2020 07:34 AM
I need to restrict users from updating work notes when they impersonate as some other user.
I need to achieve this both in scoped and global apps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2020 08:01 AM
Hi Rajasekhar,
you can use that in scoped app BR on incident table for example
Condition: Work notes changes
Script below:
var isImpersonator = gs.getSession().isImpersonating();
if(isImpersonator){
gs.addErrorMessage('You are not allowed to edit work notes as you are impersonator');
current.setAbortAction(true);
}
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2020 09:58 AM
Hi,
Any update on this?
Can you mark my answer as ✅ correct, 👍 helpful if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader