The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.

OnFindRecord Trigger

Overrides the default page behavior and enables you to specify which record you want to display when the page opens.


[Ok]:= OnFindRecord(Which)  



Text or code value with the following options:

Parameter Value Result
- (a dash) First record
+ (a plus sign) Last record
=>< Record defined in the Rec variable or the closest match

Return Value


(Boolean) Indicates whether the specified record was found.

Value Result
true Found
false Not found (default)

Applies To

  • Pages


By default, opened 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.

See Also

Page and Action Triggers