Background Page Tasks in Business Central Explained
Background page tasks enable pages to automatically refresh themselves or trigger actions when long-running processes complete. Introduced in Business Central 2019 Wave 2, they prevent users from repeatedly refreshing pages while waiting for operations to finish by using the OnPageBackgroundTaskCompleted trigger to update data and UI automatically.

post Aardvark Labs
"When ANY page background task is completed the OnPageBackgroundTaskCompleted trigger fires."
Key points
- Page background tasks arrived in BC 2019 Wave 2 (15.2) and let a page refresh itself so users do not have to keep refreshing by hand
- Refreshing a page also refreshes its background worker, so the design needs a static host page and a dynamic page that gets refreshed. The example uses a Card with an embedded ListPart, started through a StartRefresh procedure
- OnPageBackgroundTaskCompleted fires for any completed page background task, so the code compares the TaskId with the stored PbtTaskId before it requeues the task and calls RefreshData
- The codeunit only sleeps here, but it could do real long-running work such as posting. When the work finishes, the page could show a message, navigate somewhere else or start an AI process
Quotes
- “When ANY page background task is completed the OnPageBackgroundTaskCompleted trigger fires.” (This is the core mechanism that enables automatic response to background task completion without user action.)
- “The auto refresh example is fine, but the start long running work and auto refresh when complete is a much better use case.” (Identifies the practical value of background tasks beyond simple refresh scenarios, such as monitoring posting routines or long-running operations.)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
- page “ARD_Order Monitor”
- page “ARD_ReleasedSalesOrder”
- codeunit “ARD_AutoRefreshDelay”
- table 36 “Sales Header”
Not found in BC28-30: page “ARD_Order Monitor”, page “ARD_ReleasedSalesOrder”, codeunit “ARD_AutoRefreshDelay”.
Context
- Features: Page background tasks, OnPageBackgroundTaskCompleted trigger, EnqueueBackgroundTask method, Auto-refresh capability, ListPart embedding, Long-running process monitoring
- Versions: 15.2, 2019 Wave 2
Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.