Επεξεργασία

Κοινή χρήση μέσω


Database.SID([Text]) Method

Version: Available or changed with runtime version 1.0.

Retrieves the security identifier (SID) of a Windows user account.

Note

This method is supported only in Business Central on-premises.

Syntax

SID :=   Database.SID([UserAccount: Text])

Note

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

Parameters

[Optional] UserAccount
 Type: Text
The Windows user account for which you want to get the SID. You must specify a domain and user name, such as 'cronus\simon'.

Return Value

SID
 Type: Text
The SID of the specified Windows user account.

Remarks

If you create a page for adding Windows logins, then you must use the SID method to retrieve the SID for the user account so that you can enter the new login into the Windows Login table.

This method runs only on the computer that is running Dynamics 365 Business Central service. If you call this method from the client computer, then no action occurs.

Example

var
    NewSID: Text[119];
    UserAccount: Text[132];
begin
    UserAccount := 'cronus\simon';  
    NewSID := SID(UserAccount);  
end;

Database Data Type
Get Started with AL
Developing Extensions