- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2020 05:04 PM
I am attempting to sort a GlideRecord query against he Sys_User table by the Manager field. I know this is because it's a reference field, but I'm having trouble with the syntax. Can anyone help me sort this query by the manager name or userid?
var names = new GlideRecord('sys_user');
names.addQuery('user_name', 'IN', varName);
names.orderBy('manager');
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2020 05:19 PM
Please use names.orderBy('manager.name');
Please mark this ACCEPTED & HELPFUL if applicable. Thanks!
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2020 05:19 PM
Please use names.orderBy('manager.name');
Please mark this ACCEPTED & HELPFUL if applicable. Thanks!
Muhammad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2020 05:21 PM