PAGE.RUN Function

Creates and launches a page object, which you specify.


PAGE.RUN(Number[, Record] [, Field])  


Type: Integer

The number of the page that you want to run. If you enter zero (0), the system displays the default lookup window for the current page. Choose View, and then choose C/AL Symbols Menu to select the page from a list.

If the page you specify does not exist, a run-time error occurs.

Type: Record

The Page.RUN function shows, by default, the record last displayed on the page. For each object, the system stores information about the most recently displayed 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 attached to the window. When the record is displayed, the key and filters attached to the record are used.

Type: Field

Use this optional parameter to select a specific field on which focus will be placed.


If, at design time, you do not know the specific page you want to run, then use this function or the PAGE.RUNMODAL Function and specify the page in the Number parameter.

If you do know which page you want to run, then you can create a Page variable, set the subtype of the variable to a specific page, and then use the RUN Function (Page) or RUNMODAL Function (Page) on the Page variable.

When you want to close the page, use CurrPage.CLOSE. CurrPage is a predefined system variable.



See Also

Page Data Type