Skip to content

$ActiveUser

Represents the identity of the currently active user.

1
const $ActiveUser: Identity;

Remarks

This variable is available in screen scripts and server modules acting on behalf of a user. It is not guaranteed in instance lifecycle scripts; use $Initiator when the script needs the identity that started the instance.

Getting the active user's ID and name

1
2
3
var user = $ActiveUser;
var userId = user.Id;
var userName = user.Name;

Use the active identity in an authorization-sensitive lookup

1
var canExecute = $Domain.HasPermission($ActiveUser, "Default", 16);

Capabilities

Properties