The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.
TABLECAPTION Method (Record)
Gets the current caption of a table as a string.
Caption := Record.TABLECAPTION
The record in the table for which to retrieve the table caption.
Property Value/Return Value
Type: Text or code
The caption of the table.
TABLECAPTION returns the caption of a table. TABLECAPTION first looks for a CaptionML Property. If it does not find one, it uses the Name Property. This means that TABLECAPTION has multilanguage functionality.
The following example retrieves the caption of the Customer table by using the CustomerRec variable, a record from the Customer table. The value of the Customer table caption is stored in the TableCaption variable and displayed in a message box. The value that is displayed is Customer. This example requires that you create the following global variables.
TableCaption := CustomerRec.TABLECAPTION; MESSAGE('The caption for the customer table is: %1', TableCaption);