Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / Autorefresh a table fo...
Sales forum
Suggested answer

Autorefresh a table form ever 5 seconds to show externaly inserted data in the table

Posted on by 121

Hi Guys,

We are creating a new app for operations in D365 CE.

the form we are creating lists a bunch of things an external Azure runbook wil do. We will also show a subgrid with a view of the logging table where Azure will write the progress of the tasks.

Is there a way to have a yes no slider of tickbox that will start a function (I asume javascript or powerA) to refresh the page every x seconds to show the new data azure runbooks have added to the logging table. Yes I am lazy ;) . We need the yes/no box or slider to make sure it does not refresh when we are inputting the data. only when we fire up the jobs we will set it to yes and then see the page refresh on its own 

Categories:
  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 5,801 Moderator on at
    RE: Autorefresh a table form ever 5 seconds to show externaly inserted data in the table

    If you need you can put your code on load of the form and compare the count of the records on the grid and on backend. if it matches then you can stop the refresh else just put a wait condition for couple of seconds and go thought the same condition again.

    If you don't want this customization then just add this sub grid on separate tab and use default refresh button on the sub grid.

    Thank you,

    Amit Katariya

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 Moderator on at
    RE: Autorefresh a table form ever 5 seconds to show externaly inserted data in the table

    Hi Jurgen,

    You can follow this thread to implement the grid refresh in every 5 secs:

    community.dynamics.com/.../refresh-entity-form-after-adding-row-to-a-sub-grid

  • ez Jurgen Profile Picture
    ez Jurgen 121 on at
    RE: Autorefresh a table form ever 5 seconds to show externaly inserted data in the table

    Oh even better if we could refresh the subgrid only

  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 5,801 Moderator on at
    RE: Autorefresh a table form ever 5 seconds to show externaly inserted data in the table

    do you want to refresh the Form or the subgrid ?

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 Moderator on at
    RE: Autorefresh a table form ever 5 seconds to show externaly inserted data in the table

    Hi Jurgen,

    Please refer to the below links that you can use for refreshing the form. Basically, you have to register this function on Load of the form and use setTimeOut method to execute the refresh function. Also, you can put a condition in your logic to check for the field value if it is set to yes or not. Based on this you can achieve your goal.

    docs.microsoft.com/.../refresh

    www.w3schools.com/.../met_win_settimeout.asp

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,277 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,126 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans