web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

RTC client side timer in a list part page

(0) ShareShare
ReportReport
Posted on by 20

Hello Experts,

I am trying to implement a timer in a listpart type of page which i will use as a factbox.  I can't seem to make the timer work so it refreshes the factbox info every x number of seconds.  I tried the ping pong timer which came in as an RTC addin.  However, i don't understand how this works.  I add it in the global variable and select yes to the with events property.  But i don't know how to instantiate the latter.  The example in microsoft says to call currpage.pingpong.ping(300)....but how can i call this control when i didn't add it in the listpart page.  also, i tried the RTC timer from Microsoft.Dynamics.Nav.Client addin and that one doesn't seem to fire the elapsed trigger as well.

Please help.  I have been stuck with this for a day now.

I have the same question (0)
  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    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

  • Suggested answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at

    Hi, hope the following helps.

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-dotnet-controladdins

    Thanks.

    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans