Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2018 01:00 PM
Can some one give me the code for getting the logged in user department
I tried gs.getUser().getDepartmentID(); and getDepartmentID() none of them worked
Solved! Go to Solution.
Labels:
- Labels:
-
Service Catalog
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2018 07:55 AM
15 REPLIES 15
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2021 10:54 AM
var interUser = gs.getUser().getID();
var userRec = new GlideRecord('sys_user');
userRec.get(interUser);
var result = userRec.department.getDisplayValue();
// If you want the object, you can skip the .getDisplayValue() at the end.