Export (0) Print
Expand All

ISTEMPORARY Function (RecordRef)

Microsoft Dynamics Nav 2009

Determines whether a RecordRef refers to a temporary table.


Temp := RecordRef.ISTEMPORARY

Parameters

RecordRef

Type: RecordRef

The RecordRef of a record that refers to a table.

Type: Boolean

true if the RecordRef refers to a temporary table; otherwise, false.

In previous versions of Microsoft Dynamics NAV, if a RecordID or a RecordRef referred to a temporary table, then the table number value of the RecordID or RecordRef was the run-time generated sequence ID, which is from the base value of 2000100000. You could use the table number to determine if a RecordID or a RecordRef referred to a temporary table. In Microsoft Dynamics NAV 2009, the table number value of a RecordID or a RecordRef always contains the ID of the originating physical table and not the run-time generated sequence ID. If you previously used the TABLENO Function (RecordID) or the NUMBER Function (RecordRef) to test for the sequence number and determine if the RecordID or RecordRef was temporary, then you must use the ISTEMPORARY function in Microsoft Dynamics NAV 2009 instead.

This example shows that you can replace code that you used previously to determine if a RecordRef referred to a temporary table. This example requires that you create a RecordRef variable named RecordRefVar.

// Previous code
IF RecordRefVar.Number >= 2000100000 THEN BEGIN
  // Code for temporary tables
END;

// New code
IF RecordRefVar.IsTemporary THEN BEGIN
  // Code for temporary tables
END;

Community Additions

ADD
Show:
© 2014 Microsoft