Using Windows Environment Variables in C/AL

Do functions exist in C/AL to get windows environment variables? Or is there some OCX that we need to register to be able to get these variables?

I am particularly interested in the Windows environment variables of USERNAME and COMPUTERNAME.

Thanks.

I guess I should check the help menu in Navision first… :slight_smile:

the ENVIRON function provides what I am looking for.

String := ENVIRON(Name)

String

Data type: text constant or code

The string associated with the environment variable.

Name

Data type: text constant or code

The name of the environment variable.