Creates an encryption key for the current Microsoft Dynamics NAV tenant.

CREATEENCRYPTIONKEY()

Exceptions

If a key already exists, the following error will be displayed: Unable to create a new encryption key. An encryption key already exists.

Example

This code example creates an encryption key for the current tenant. It uses the ENCRYPTIONENABLED function to perform a check.

 Copy Code
IF NOT ENCRYPTIONENABLED THEN
        CREATEENCRYPTIONKEY();

See Also