RECORDLEVELLOCKING Function (Record)
[This topic is prerelease documentation and is subject to change in future releases. Blank topics are included as placeholders. There may be some display and formatting issues until the look and feel is finalized.]
Determines whether the table supports record-level locking.
Ok := Record.RECORDLEVELLOCKING
Parameters
Record
Type: RecordThe record in the table you want to check for record-level locking.
Property Value/Return Value
Type: Boolean
true if the table supports record-level locking; otherwise, false.
Remarks
When you are using SQL Server, you can use record-level locking.
When you are using the Microsoft Dynamics NAV Database Server, you cannot use record-level locking.
Example
The following example determines whether the Customer table supports record level locking. If the table supports record level locking, record number 30000 is selected and deleted. A message indicating that the record is deleted is displayed. Otherwise, a message indicating that record level locking is not supported is displayed. This example requires that you create the following variables in the C/AL Globals window
Variable name | DataType | Subtype |
---|---|---|
MyRecord |
Record |
Customer |
CustomerRec |
Record |
Customer |
IF MyRecord.RECORDLEVELLOCKING THEN BEGIN
CustomerRec."No." := '30000';
CustomerRec.DELETE;
MESSAGE('Record number %1 is deleted', CustomerRec."No." );
END
ELSE BEGIN MESSAGE('The table does not support record level locking');
END;