- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2018 09:08 AM
Dear all,
I created a Catalog Item for user to change their manager (from current to new manager). The following script that I used to update the new_manger field after the approval of the new manager and it is not working.
Could you all help me on this?
var user_ref = current.variable.caller_id;
var user_man = current.variables.new_manager;
var userU = new GlideRecord ('sys_user');
userU.addQuery('sys_id',caller_id);
userU.query();
if (userU.next()){
userU.manager = user_man;
userU.update();
current.variables.manager = current.variables.new_manager;
gs.addInfoMessage("Manager has been updated to " + user_man);
}
Regards,
Hong
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2018 10:54 AM
Hi Hong,
Glad I could help. Since my answer solved your question, please mark my answer as correct so we can close this thread.
Brent
P.S. If my suggestion helped then please mark as helpful and/or correct so other community members can benefit from this information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2018 06:11 AM
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-20-2018 10:54 AM
Hi Hong,
Glad I could help. Since my answer solved your question, please mark my answer as correct so we can close this thread.
Brent
P.S. If my suggestion helped then please mark as helpful and/or correct so other community members can benefit from this information.