# Page.RunModal(Text, Record, FieldRef) Method
> Version: _Available or changed with runtime version 17.0._
Creates, opens, and closes a page that you specify. When a page is run modally, no input, such as a keyboard or mouse click, can occur except for objects on the modal page.
## Syntax
```al
[Action := ]  Page.RunModal(FullyQualifiedName: Text, Record: Record, FieldRef: FieldRef)
```
## Parameters
FullyQualifiedName
Type: ../text/text-data-type
The fully qualified name of the page that you want to run.
Record
Type: ../record/record-data-type
By default, this function shows the record that was last displayed on the page. For each object, information is stored about the most recently shown record and the attached key and filters. Use this optional parameter to select a specific record to display on the page. The record must be of the same type as the table that is attached to the page. When the record is displayed, the key and filters that are attached to the record are used.
FieldRef
Type: ../fieldref/fieldref-data-type
Use this parameter to select a specific field on which focus will be put.
## Return Value
*[Optional] Action*
Type: ../action/action-option
Specifies what action the user took on the page.
## See Also
page-data-type
Getting 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/page/page-runmodal-string-table-fieldref-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/page/page-runmodal-string-table-fieldref-method/
