Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2017 07:41 AM
Another script that I used to test if my impersonation works is as below:
var og = gs.getSession().impersonate('5136503cc611227c0183e96598c4f706');
gs.print(gs.getUser().getFullName());
var gr1 = new GlideRecord('sn_customerservice_case');
gr1.addQuery('sys_id',b08cd51fdba83a007a4cbedffe96196d');
gr1.query();
if(gr1.next())
gs.print("Found it");
else
gs.print("Not Found");
gs.getSession().impersonate(og);
*** Script: Guest
*** Script: Not Found