C/AL Globals

Declares global variables, text constants, and functions in Microsoft Dynamics NAV. The scope of the global variables, text constants, and functions is limited to the object.

To open this window, on the Tools menu, choose Object Designer. In Object Designer, choose Table, Page, Report, Codeunit, Query or XMLport, choose the Design button, and then on the View menu, choose C/AL Globals.

Variables Tab

You can declare global user-defined variables or system-defined variables. For more information about variables, see C/AL Variables.

Field Description

Name

The name of the variable.

DataType

The data type that is applied to the variable. For more information, see C/AL Data Types.

SubType

The type of data that is stored in a variable. SubType contains additional information about a data type. For example, a Report data type might have the Customer table as a subtype.

Length

The length of the characters in the field. This applies to Code and Text. For example, a Text data type might have a length of 100.

Text Constants Tab

A text constant is a character string that is declared to enable translation of messages into other languages.

Field Description

Name

The name of the text constant.

ConstValue

The value of the character string that is declared as a constant. You can open the Multilanguage Editor window by choosing the AssistEdit button in the ConstValue field.

Functions Tab

Field Description

Name

The name of the function.

Locals button

Opens the C/AL Locals window. The window contains parameters, return values, variables, and text constants that are declared for local functions or triggers. For more information, see C/AL Locals.

See Also

Reference

C/AL Locals

Show: