Creates and launches a page object, which you specify.
PAGE.RUN(Number[, Record] [, Field])
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. Click View, click C/AL Symbols Menu to select the page from a list.
If the page you specify does not exist, a run-time error occurs.
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.
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, use this function or the PAGE.RUNMODAL function.
If you do know which page you want to run, you can use the RUN (Form) or RUNMODAL (Form) function to specify a variable.
When you want to close the page, use CurrPage.CLOSE. CurrForm is a predefined system variable.
It is important to remember that pages that have been created by transforming existing forms still use the same code as the original forms. Furthermore, when you compile your code to C#, forms and pages are both treated as forms.
If, from a page, you call another form that does not have a corresponding page, you will receive an error message.
If you run this page function on a Classic client, you receive an error because the Classic client does not support pages.
IF IsServiceTier THEN Page.RUN(4711); ELSE Form.Run(4711);