GlideSystem - isInteractive()

Checks if the current session is interactive.

An example of an interactive session is when a user logs in using the log-in screen. An example of a non-interactive session is using a SOAP request to retrieve data.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
Boolean True if the session is interactive.

Scoped equivalent

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

if (!gs.hasRole('admin') && gs.isInteractive()) {
    var qc1 = current.addQuery('u_group', '');
    var gra = new GlideRecord('sys_user_grmember');
    gra.addQuery('user', gs.getUserID());
    while ( {