- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2019 12:08 AM
How to find non admin user in servicenow, he must have permissions to raise Ritm
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2019 03:57 AM
Can you add the log statement in the script include after this line and tell me the log output.
var thisUser = gs.getUser().getUserByID(userID);
gs.log("Group name is "+groupName+"----"+userID);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2019 03:05 AM
Hello Nag,
Kindly call the script include and check the output. If you ar facing any issue, then let us know and we can assist you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2019 05:33 AM
yes Asif its already called in client scrip. But while im trying to impersonate an non admin and raised a ritm and changed the task to closed complete, Still the non admin user are able to edit the variable tab on ritm form.
It must be read only mode

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2019 05:37 AM
Okay.
So can you check which of your 2 conditions is returning false?
Add debugging lines in your onload clinet script after the below line.
var answer = response.responseXML.documentElement.getAttribute("answer");
alert(answer);
alert(g_user.hasRole('admin'));
This shoudl help you to debug easily.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2019 05:47 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2019 06:00 AM
are you saying you are getting null for both alerts?
If you are getting null as admin, then there is an issue in your script include or something else.
can you try g_form.addInfoMessage(answer); instead of alert.
g_form.addInfoMessage(g_user.hasRole('admin'));
Regarding screenshot, thats a warning. we can fix that later.