RecordRef.RecordId() Method
Version: Available or changed with runtime version 1.0.
Gets the RecordID of the record that is currently selected in the table. If no table is selected, an error is generated.
Syntax
RecordID := RecordRef.RecordId()
Note
This method can be invoked using property access syntax.
Parameters
RecordRef
Type: RecordRef
An instance of the RecordRef data type.
Return Value
RecordID
Type: RecordId
The ID of the table.
Example
The following example opens table 18 (Customer) as a RecordRef variable that is named MyRecordRef. The FindLast Method (RecordRef) finds the last record in the table. The record id of the last record is retrieved, stored in the RecID variable displayed in message box.
var
MyRecordRef: RecordRef;
RecID: RecordId;
Text000: Label 'The record id for the last record is: %1';
begin
MyRecordRef.Open(18);
MyRecordRef.FindLast;
RecID := MyRecordRef.RecordId;
Message(Text000, RecID);
end;
See Also
RecordRef Data Type
Get Started with AL
Developing Extensions
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈