getting a sysid and using it to lookup a name
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2010 09:30 AM
why won't this script use the sys_id returned by gs.getUserID()) to look up the name ?
it is displaying the message within the next loop, which tells me it found the sys_id, but the user name is blank.
var u=new GlideRecord('sys_user');
u.addQuery('sys_id',gs.getUserID());
u.query();
while (u.next() ) {
gs.log (" u.name:",u.last_name);
}
Thank you.
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2010 08:13 AM
Thank you Mark. Thats an amazing site ! I posted a reply to one of your tips there about import and scripting, that is a re-phrase of my other question posted here, about schedule_data_import.