# TestPage.RunPageBackgroundTask(Integer [, var Dictionary of [Text, Text]] [, Boolean]) Method
> Version: _Available or changed with runtime version 4.0._
Runs the page background task codeunit in a child session and waits for its completion. Note that page background task completion triggers are not invoked by default; see parameter "RunCompletionTriggers".
## Syntax
```al
Results :=   TestPage.RunPageBackgroundTask(CodeunitId: Integer [, var Parameters: Dictionary of [Text, Text]] [, RunCompletionTriggers: Boolean])
```
## Parameters
TestPage
Type: testpage-data-type
An instance of the testpage-data-type data type.
CodeunitId
Type: ../integer/integer-data-type
Specifies the ID of the codeunit to run.
*[Optional] Parameters*
Type: Dictionary of [Text, Text]<../dictionary/dictionary-data-type>
Specifies a collection of keys and values that are passed to the OnRun trigger of the codeunit that runs when the page background task session is started.
*[Optional] RunCompletionTriggers*
Type: ../boolean/boolean-data-type
Runs the completion triggers after the completion of the code unit. Default value is false.
## Return Value
Results
Type: Dictionary of [Text, Text]<../dictionary/dictionary-data-type>
The dictionary of results for the page background task.
## Related information
testpage-data-type
Get 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/testpage/testpage-runpagebackgroundtask-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/testpage/testpage-runpagebackgroundtask-method/
