次の方法で共有


GUIALLOWED Function

Checks whether the C/AL code can show any information on the screen.

[Ok :=] GUIALLOWED

Property Value/Return Value

Type: Boolean

If the return value is true, then the GUI is available.

If the return value is false, then the C/AL code is running on Microsoft Dynamics NAV Application Server and no GUI is available.

Remarks

User Portal Application Server accepts GUIALLOWED.

Example

This example shows how to use the GUIALLOWED function.

This example requires that you create the following text constant in the C/AL Globals window.

Text constant ENU value

Text000

Code is running on a client.

IF GUIALLOWED THEN
 MESSAGE(Text000);

If the code runs on a client, which means that the user interface is available, a message box will appear with the following message.

Code is running on a client

If the code runs on Microsoft Dynamics NAV Application Server, then the message will not be displayed.

Note

If the MESSAGE Function (Dialog) or the ERROR Function (Dialog) is called when the code is running on Microsoft Dynamics NAV Application Server, then the message is written to the event log of the operating system.

See Also

Reference

APPLICATIONPATH Function
HYPERLINK Function
SLEEP Function
TEMPORARYPATH Function