- 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:49 PM
Hey,
I just replied to your other thread. Use
gs.getUser().isMemberOf(current.assignment_group.toString())
OR
gs.getUser().isMemberOf(current.assignment_group.sys_id+'')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2021 04:29 PM
Please note that you never want to use code like:
current.assignment_group.sys_id
Instead do this:
current.getValue( 'assignment_group' )
Dot walking to a 'sys_id' actually LOOKS UP the 'assignment_group' by 'sys_id' only for the record to be used to return the 'sys_id'. It is a completely wasted lookup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2023 11:53 AM
gs.getUser().isMemberOf(current.assignment_group.toString())
This one works!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2017 10:52 PM
Try below instead
if(gs.getUser().isMemberOf(current.assignment_group.toString()))
OR
if(gs.getUser().isMemberOf(current.assignment_group.name))