Redigera

Dela via


Page Data type

Version: Available or changed with runtime version 1.0.

Contains a number of simpler elements called controls. Controls are used to display information to the user or receive information from the user.

Static methods

The following methods are available on the Page data type.

Method name Description
GetBackgroundParameters() Gets the page background task input parameters.
Run(Integer [, Record] [, Any]) Creates and launches a page that you specify. You can use CLEAR method to remove the page.
Run(Integer, Record, Integer) Creates and launches a page that you specify. You can use CLEAR method to remove the page.
RunModal(Integer [, Record] [, Any]) 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.
RunModal(Integer, Record, Integer) 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.
RunModal(Integer, Record, FieldRef) 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.
SetBackgroundTaskResult(Dictionary of [Text, Text]) Sets the page background task result as a dictionary. When the task is completed, the OnPageBackgroundCompleted trigger will be invoked on the page with this result dictionary.

Instance methods

The following methods are available on instances of the Page data type.

Method name Description
Activate([Boolean]) Activates the current page on the client if possible. The data on the page will not be refreshed.
CancelBackgroundTask(Integer) Attempt to cancel a page background task.
Caption([Text]) The caption shown in the title bar. For example, the default value in English (United States) is the same as the name of the page.
Close() Closes the current page.
Editable([Boolean]) Gets or sets the default editability of the page.
EnqueueBackgroundTask(var Integer, Integer [, var Dictionary of [Text, Text]] [, Integer] [, PageBackgroundTaskErrorLevel]) Creates and queues a background task that runs the specified codeunit (without a UI) in a read-only child session of the page session. If the task completes successfully, the OnPageBackgroundTaskCompleted trigger is invoked. If an error occurs, the OnPageBackgroundTaskError trigger is invoked. If the page is closed before the task completes, or the page record ID on the task changed, the task is cancelled.
GetRecord(var Record) Gets the current record of the page.
LookupMode([Boolean]) Gets or sets the default lookup mode for the page.
ObjectId([Boolean]) Returns a string in the "Page xxx" format, where xxx is the caption or ID of the application object.
PromptMode([PromptMode]) The mode of a PromptDialog page that prompts the user for input and shows the output of a copilot interaction.
Run() Creates and launches a page that you specify. You can use CLEAR method to remove the page.
RunModal() 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.
SaveRecord() Saves the current record as if performed by the client. If the record does not exist it is inserted, otherwise it is modified.
SetRecord(var Record) Sets the current record for the page.
SetSelectionFilter(var Record) Notes the records that the user has selected on the page, marks those records in the table specified, and sets the filter to "marked only".
SetTableView(var Record) Applies the table view on the current record as the table view for the page, report, or XmlPort.
Update([Boolean]) Saves the current record and then updates the controls on the page. If you set the SaveRecord parameter to false, this method will not save the record before the page is updated.

Get Started with AL
Developing Extensions