CURRENTEXECUTIONMODE Function (Sessions)

Specifies the mode in which the session is running.

ExecutionMode := CURRENTEXECUTIONMODE

Type: ExecutionMode

The execution mode is one of the following:

  • Debug

  • Standard

If you start the Microsoft Dynamics NAV Windows client at a command prompt and use the –debug parameter, then the execution mode is Debug. Otherwise, the execution mode is Standard.

This example requires that you create a variable named Mode that has a DataType of ExecutionMode.

Mode := CURRENTEXECUTIONMODE; 
MESSAGE('Current execution mode is %1.', Mode);
Show: