次の方法で共有


SID Function (Database)

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

Sid := SID(UserAccount);

Parameters

  • 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'.

Property Value/Return Value

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 function to retrieve the SID for the user account so that you can enter the new login into the Windows Login table.

This function runs only on the computer that is running Microsoft Dynamics NAV Server. If you call this function from the client computer, then no action occurs.

Example

This example assigns the SID for Simon's Windows user account to a variable. This example requires that you create the following variables.

Name DataType Length

NewSID

Text

119

UserAccount

Text

132

UserAccount := 'cronus\simon';
NewSID := SID(UserAccount);