# OnFindRecord (Page) trigger
> Version: _Available or changed with runtime version 1.0._
Overrides the default page behavior and enables you to specify which record you want to display when the page opens.
## Syntax
```al
trigger OnFindRecord(Which: Text): Ok
begin
    ...
end;
```
### Parameters
Which
Type: ../../methods-auto/text/text-data-type
Text or code value with the following options:
 (a dash): First record,
 (a plus sign): Last record,
=\<\>: Record defined in the Rec variable or the closest match.
## Return value
Ok
Type: ../../methods-auto/boolean/boolean-data-type
true if the specified record was found, otherwise, false.
## Remarks
By default, open pages display the last record shown when the user exited the page. Use this trigger to override the default behavior and display the first record, last record, or a specific record as defined in the Rec variable.
## Related information
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>
OnFindRecord (Request Page) Trigger<../requestpage/devenv-onfindrecord-requestpage-trigger>

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/triggers-auto/page/devenv-onfindrecord-page-trigger, 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/triggers-auto/page/devenv-onfindrecord-page-trigger/
