How to refresh a Data Grid on data change

I am using Data Grid 2 to display data directly from an entity named – TaskStatus with attributes → TaskId, Status.   There is a microflow running in the task queue which is updating the statuses for the already present TaskIds in TaskStatus entity. I am using Commit Object widget and have also  turned the “Refresh In Client” flag as On. But still it is not updating the data grid automatically.    Is there any way I can achieve the same? I want the data grid to be updated automatically as soon as the status changes.
1 answers

So the reason your data grid isn't updating when running a flow in the queue, is that the queue does not have a “client” to refresh – it's running in the background (on the server)


If you want something like client refreshes for a process that the user didn't start themselves, you can use one of two methods:

  1. The quick and dirty method: Add a Microflow Timer to your page that refreshes the page every x seconds. This is dirty because you will be refreshing often even if there are no changes to any of the objects, and it's not great for performance, but it's very easy and quick to implement.
  2. The better, but harder to implement solution: Websockets. These allow your client to listen to a server that can send a message whenever the grid in question should be updated. 

Depending on your use case, one or the other might be better.