Runs after a page background task has successfully completed.
OnPageBackgroundTaskCompleted(TaskId: Integer; Results: Dictionary of [Text, Text])
Specifies the ID of the background task that was run. The ID is automatically assigned to the background task when it is created.
Type: Dictionary of [Text, Text]
Specifies the results of the page background task.
The following example modifies the
OnPageBackgroundTaskCompleted trigger to update the page with the started and finished times that were calculated in the page background task, and displays a notification that the times have been updated. For more details about this example, see Page Background Tasks.
trigger OnPageBackgroundTaskCompleted(TaskId: Integer; Results: Dictionary of [Text, Text]) var started: Text; waited: Text; finished: Text; PBTNotification: Notification; begin if (TaskId = WaitTaskId) then begin Evaluate(started, Results.Get('started')); Evaluate(waited, Results.Get('waited')); Evaluate(finished, Results.Get('finished')); before1 := started; duration1 := waited; after1 := finished; PBTNotification.Message('Start and finish times have been updated.'); PBTNotification.Send(); end; end;