hi
To implement a timer in a listpart page as a factbox, you can use the Windows Timer object available in Microsoft Dynamics NAV. Here is a sample code that you can use:
Declare a variable for the timer in the global variable section:
Timer@1100000000 : Automation "'Windows Timer', 'WindowsTimer'";
Initialize the timer in the OnOpenPage trigger of the page:
Timer.Interval := 5000; // Set the interval to 5 seconds
Timer.Enabled := true; // Start the timer
Handle the OnTimer trigger of the timer to refresh the factbox:
trigger OnTimer()
begin
// Refresh the factbox data here
end;
Make sure to disable the timer in the OnClosePage trigger to avoid any issues:
Timer.Enabled := false; // Stop the timer
You can adjust the interval value as per your requirements. This code should work without any add-ins or external libraries.
DAniele