USERSECURITYID Function
Microsoft Dynamics NAV 2016
Gets the unique identifier of the user that is logged on to the current session.
USID := USERSECURITYID
This example requires that you create the following variables and text constant in the C/AL Globals window.
| Variable name | DataType |
|---|---|
|
User |
Text |
| Text constant name | ConstValue |
|---|---|
|
Text000 |
The client was started by a user with the ID %1. |
User := USERSECURITYID; MESSAGE(Text000, User);
The following is an example of the output of the previous code:
The client was started by a user with the ID 1049f495-27ba-46a5-acca-ecf92324fbf8.
Show: