# FieldRef.Record() Method
> Version: _Available or changed with runtime version 1.0._
Gets the RecordRef of the field that is currently selected. This method returns an error if no field is selected.
## Syntax
```al
Record :=   FieldRef.Record()
```
## Parameters
FieldRef
Type: fieldref-data-type
An instance of the fieldref-data-type data type.
## Return Value
Record
Type: ../recordref/recordref-data-type
## Example
The following example opens the Item table as a RecordRef variable that is named ItemRecref, creates a reference to field 1 \(No.\), and stores the value in the variable named MyFieldRef. The Record method uses the MyFieldRef variable to return the RecordRef of field 1 and stores the reference in a variable named MyRecRef. MyRecRef.Number returns the table that the selected field belongs to.
```al
var
    MyFieldRef: FieldRef;
    ItemRecref: RecordRef;
    MyRecRef: RecordRef;
    Text000: Label 'The selected field is from table %1.';
begin
    ItemRecref.Open(Database::Item);
    MyFieldRef := ItemRecref.Field(1);
    MyRecRef := MyFieldRef.Record;
    Message(Text000, MyRecRef.Number);
end;
```
## Related information
fieldref-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/fieldref/fieldref-record-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/fieldref/fieldref-record-method/
