- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi all,
I am using getMyGroups() in my code to get all groups. It is returning one extra group. Why?
I know below thing can be achieved by other ways, but I want to use getMyGroups().
My code-
*** Script: Name HR Tier 1
*** Script: Name App Engine Admins
*** Script: Name Conditional Script Writer
*** Script: Name Team Development Code Reviewers
*** Script: Name HR
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
this is not documented but members in past have reported the same OOTB behavior and hence we used that approach
this past post talks about the same
getMyGroups() function is returning any parent group of child group in bread crumb
this KB talks about same when the same function is used in dynamic filter options
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I believe I also shared a working solution using GlideRecord.
As per new community feature you can mark multiple responses as correct.
💡 If my response helped, please mark it as correct ✅ as well so that this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @RaghavSh ,
Now It is giving me exact groups.
But when I try to use that in Gliderecord it is not giving me exact result. It is giving four sys_ids but when I try to iterate through that it is giving only 2 groups.
Script -
Output-
** Script: [22d52c269f221200d9011977677fcf97, 477a05d153013010b846ddeeff7b1225, 5ee74940b70022108d4406dd1e11a918, cfcbad03d711110050f5edcb9e61038f]
*** Script: App Engine Admins
*** Script: Conditional Script Writer
