Editar

Compartir a través de


Database.UserId() Method

Version: Available or changed with runtime version 1.0.

Gets the user name of the user account that is logged on to the current session.

Syntax

ID :=   Database.UserId()

Note

This method can be invoked using property access syntax.

Note

This method can be invoked without specifying the data type name.

Return Value

ID
 Type: Text
This string contains the value of the User Name field in table 2000000120, the User table, for the current user.

Example

User := UserId;  
Message('The system was started by %1', User);  

The following is an example of the output of the previous code:

The system was started by cronus\simon.

Database Data Type
Get Started with AL
Developing Extensions