# RecordRef.FindLast() Method
> Version: _Available or changed with runtime version 1.0._
Finds the last record in a table based on the current key and filter.
## Syntax
```al
[Ok := ]  RecordRef.FindLast()
```
## Parameters
RecordRef
Type: recordref-data-type
An instance of the recordref-data-type data type.
## Return Value
*[Optional] Ok*
Type: ../boolean/boolean-data-type
true if the operation was successful; otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.
## Remarks
You should use this method instead of Find\('+'\) when you need only the last record.
You should use this method only when you explicitly want to find the last record in a table or set. Do not use this method in combination with repeat..until.
## Example
The following example opens the Item table \(27\) as a RecordRef variable that is named ItemRecref. The FindLast method searches for the last record in the table. If the record is found, the description and unit price of the item in the record are displayed in a message box. Otherwise, a message that indicates that the last item was not found is displayed.
```al
var
    ItemRecref: RecordRef;
    Text000: Label 'The last item is %1 and the unit price is %2.';
    Text001: Label 'The last item was not found.';
begin
    ItemRecref.Open(27);
    if ItemRecref.FindLast then
      Message(Text000, ItemRecref.Field(3),  ItemRecref.Field(18))
    else
      Message(Text001);
end;

```
## Related information
recordref-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/recordref/recordref-findlast-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/recordref/recordref-findlast-method/
