- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2018 11:06 AM
I have a user Criteria where logged in uses / users who are active can view , but seems like its not working as expected
can some one help me whats wrong in the code
scriptAut();
function scriptAut() {
var retVal;
if (gs.getUser() =="") { // i tried this as well if (gs.getUser() ==active) {
retVal = false;
} else {
retVal = true;
}
return retVal;
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2020 05:58 AM
Yes ,, gs.getuser is not supported in user criteria ,, there is a problem ticket opened
This is the solution given by Hi team
Solution Proposed: ============ IS THIS A BUG? ============
So we are dealing with a bug on our platform which is intermittent and occurs very rarely. This is recorded in PRB1319258 with the following description: Using GlideSystem objects such as gs.getUser(), gs.getUserID(), gs.getSession() in User Criteria does not work as expected consistently. This problem has been declared as "Working As Expected" with the reason that the issue happens very rarely.
============ ANY WORKAROUND? ============ However, we have a workaround in place which will involve moving your implementation to using script include (which is aware of application scope changes). This will ensure that the value returned correctly every time without failing intermittently. Please throughly review this knowledge article regarding this (has examples): https://hi.service-now.com/kb_view.do?sysparm_article=KB0719846
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2018 06:34 AM
Abhinay
its not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2020 06:46 AM
Hey Kam, were u able to figure this out?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2020 05:58 AM
Yes ,, gs.getuser is not supported in user criteria ,, there is a problem ticket opened
This is the solution given by Hi team
Solution Proposed: ============ IS THIS A BUG? ============
So we are dealing with a bug on our platform which is intermittent and occurs very rarely. This is recorded in PRB1319258 with the following description: Using GlideSystem objects such as gs.getUser(), gs.getUserID(), gs.getSession() in User Criteria does not work as expected consistently. This problem has been declared as "Working As Expected" with the reason that the issue happens very rarely.
============ ANY WORKAROUND? ============ However, we have a workaround in place which will involve moving your implementation to using script include (which is aware of application scope changes). This will ensure that the value returned correctly every time without failing intermittently. Please throughly review this knowledge article regarding this (has examples): https://hi.service-now.com/kb_view.do?sysparm_article=KB0719846
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2020 04:48 PM
Hey Kam, any way you can post that article? I can't access it since I do not have HI access. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2020 05:00 PM
I cannot access that as its a HI internal kb article