Record.GetBySystemId(Guid) Method

Version: Available or changed with runtime version 4.0.

Gets a record by its SystemId.

Syntax

[RecordExists := ]  Record.GetBySystemId(SystemId: Guid)

Parameters

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

SystemId
 Type: Guid
The SystemId of the record to retrieve.

Return Value

[Optional] RecordExists
 Type: Boolean
true if the record exists; otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.

Remarks

Every record has a SystemId, which is stored in the SystemId field of the table. The SystemId cannot be changed.

Example

This example shows how to use the GetBySystemId method to retrieve a record.

var
    CustomerRec: Record Customer;
    Text000: Label 'Customer was found.';
begin
    If CustomerRec.GetBySystemId('{5286305A-08A3-E911-8180-001DD8B7338E}') then
    Message(Text000);
end;

See Also

SystemId Field
Record Data Type
Get Started with AL
Developing Extensions