- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2008 03:34 AM
I have setup a default support group field against sys_user for all of the ITIL users to record the primary support group that they belong to.
I'd like to use something like
g_form.setValue('assignment_group', g_user.u_default_grp);
or similar so that I can populate the cuurent users default group into the incident.assignment_Group field using a client UI Action.
Does anyone know if this is possible ?
Solved! Go to Solution.
- Labels:
-
Orchestration (ITOM)
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2008 10:01 AM
Here's a better example. If you wanted to modify the assign to me UI Action to include the default group you would use:
current.assigned_to = gs.getUserID();
var myUser = new GlideRecord('sys_user'); //think there's a shortcut but couldn't think of it
if (myUser.get(gs.getUserID())) {
current.assignment_group = myUser.u_default_grp;
}
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2008 12:40 PM
The g_user object is not a true user object, only a limited number of cached properties. You'll have to get the users sys_id from g_user and make a Glide Record query to get the new field value. If possible you should perform this on the server, it will be more efficient than making a server call from the client for this field. However it's certainly possible from the client.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2008 09:26 AM
Can you give me a real example ? my scripting skills are basic to say the least .. thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2008 10:01 AM
Here's a better example. If you wanted to modify the assign to me UI Action to include the default group you would use:
current.assigned_to = gs.getUserID();
var myUser = new GlideRecord('sys_user'); //think there's a shortcut but couldn't think of it
if (myUser.get(gs.getUserID())) {
current.assignment_group = myUser.u_default_grp;
}
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2008 02:48 AM
Thanks John - worked really well..