The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.
CURRENTKEY Method (RecordRef)
Gets the current key of the table referred to by the RecordRef. The current key is returned as a string.
CurrentKey := RecordRef.CURRENTKEY
The RecordRef that refers to the table for which you want to identify the current key.
Property Value/Return Value
The name of the current key of the record.
This example requires that you create the following text constants and global variables.
|Text constant||ENU value|
|Text000||The current key in the "%1" table is "%2".|
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.