Scoped GlideSession - getCurrentApplicationId()

Returns the application currently selected in the application picker.

This method requires admin privileges.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
String The currently selected application.

var session = gs.getSession();
var appID = session.getCurrentApplicationId();
gs.info(appID);

Output:

ce05b9f32b840200c5244f74b4da1501