- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 10:38 PM
hi,
When I write :
gs.getUser().isMemberOf(current.assignment_group) in my ACL , elow Error is encountered in logs.
java.lang.RuntimeException: failed to coerce com.glide.script.fencing.ScopedGlideElement to desired type java.lang.String
Caused by error in Access Control: 'x_mkgaa_non_confor_non_conformance_tasks.assigned_to' at line 2
1:
==> 2: if(gs.getUser().isMemberOf(current.assignment_group))
3: {
4: gs.info("groupppppp name okkk");
5: answer=true;
Can anyone please help me with the solution for this .
Mine is the SCOPED APPLICATION.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 10:54 PM
Hello everyone ,
I got my answer .
Actually gs.getUser().isMemberOf doesnot work in SCOPED APPLICATION.
Please refer the lonk:
Configure the ServiceNow-initiated Qualys IP scan
I implemeted their script and it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 10:54 PM
Hello everyone ,
I got my answer .
Actually gs.getUser().isMemberOf doesnot work in SCOPED APPLICATION.
Please refer the lonk:
Configure the ServiceNow-initiated Qualys IP scan
I implemeted their script and it worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2020 10:47 AM
gs.getUser().isMemberOf(current.assignment_group.getDisplayValue())
This is working for me in a Scoped App, as a condition on a UI Action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 11:10 PM
Hi Prerna,
As I understand there is a lot of issuses with the gs.getUser()... etc. in scoped apps. gs.getUserID() should work, so sadly I think you need to just do a normal GlideRecord query with that and fetch the info through it.
U can always do something like
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group',current.assignment_group);
gr.addQuery('user', gs.getUserID());
gr.query();
if(gr.hasNext() {
answer = true;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 11:28 PM
Yes , thanks for the reply .
I implemented this solution only from the above link posted by me .