Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

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

Posted on by 123

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 

  • Suggested answer
    Amit Katariya007 Profile Picture
    Amit Katariya007 8,530 Super User 2024 Season 1 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 User Group Leader 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 123 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 8,530 Super User 2024 Season 1 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 User Group Leader 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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans