編集

次の方法で共有


TextConst Data type

Version: Available or changed with runtime version 1.0.

Denotes a multi-language string constant.

Remarks

The TextConst data type is typically used for UI messages; process or error messages. Keeping the TextConst data type in global scope, makes it easier to reuse the same message for several situations. For information about naming, see CodeCop Rule AA0074.

Important

The TextConst data type is not included in the .xlf files for translation. Make sure to use the Label Data Type instead.

Example

The data type can be declared with the syntax as shown in the example below.

codeunit 50100 MyCodeunit
{
    procedure MyProcedure()
    var
        localTextConst: TextConst ENU = 'My text', DAN = 'Min tekst';
    begin
        Message(localTextConst);
    end;

    var
        globalTextConst: TextConst ENU = 'My text', DAN = 'Min tekst';
}

Get Started with AL
Developing Extensions