GlideSystem - getUserID()

Returns the sys_id of the current user.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
String The sys_id of the current user.

Scoped equivalent

To use the getUserID() method in a scoped application, use the corresponding scoped method: Scoped GlideSystem - getUserID().

if (current.operation() != 'insert' && current.comments.changes()) {
    gs.eventQueue("incident.commented", current, gs.getUserID(), gs.getUserName());
}