Record.ReadIsolation([IsolationLevel]) Method

Version: Available or changed with runtime version 11.0.

Gets or sets the read isolation level.

Syntax

[ReadIsolation := ]  Record.ReadIsolation([ReadIsolation: IsolationLevel])

Note

This method can be invoked using property access syntax.

Parameters

Record
 Type: Record
An instance of the Record data type.

[Optional] ReadIsolation
 Type: IsolationLevel
The read isolation level.

Return Value

[Optional] ReadIsolation
 Type: IsolationLevel
The read isolation level.

Remarks

For more information about read isolation level on record instances, see Record instance isolation level.

Example

The following example shows AL code with SQL isolation level hints annotated on database reads, with record instance isolation level used to override the transaction's isolation level.

local procedure UsingReadIsolation()
var
    cust: Record Customer;
    otherCust: Record Customer;
    curr: Record Currency;
begin
    cust.FindFirst(); // READUNCOMMITTED

    // Heighten isolation level for Customer table.
    cust.LockTable();

    // Explicitly select another isolation level than the transaction's.
    otherCust.ReadIsolation := IsolationLevel::ReadUncommitted;

    otherCust.FindSet(); // READUNCOMMITTED
end;

Record instance isolation level
Record Data Type
Getting Started with AL
Developing Extensions