Muokkaa

Jaa


RecordRef.CurrentKey() Method

Version: Available or changed with runtime version 1.0.

Gets the current key of the table referred to by the RecordRef. The current key is returned as a string.

Syntax

CurrentKey :=   RecordRef.CurrentKey()

Note

This method can be invoked using property access syntax.

Parameters

RecordRef
 Type: RecordRef
An instance of the RecordRef data type.

Return Value

CurrentKey
 Type: Text
The name of the current key of the record.

Example

var
    RecRef: RecordRef;
    Text000: Label 'The current key in the "%1" table is "%2".';
begin
    RecRef.Open(18);  
    Message(Text000,RecRef.Caption,RecRef.CurrentKey);
end;  

RecRef.Open(18) - Opens table 18 or causes a run-time error if table 18 does not exist.

RecRef.Caption - Returns the caption of the table.

RecRef.CurrentKey - Returns the caption of the current key in the table.

RecordRef Data Type
Get Started with AL
Developing Extensions