Refresh Client after Database update with API

0
Hi all, I want to refresh the Webclient when a new Record is created via API-Restcall. I have installed the Comunity Common refreshClassByObject. Object is the Entity. My trigger is a Microflow with the Java Action in Event handlers of the Entity, after create. In Mendix it shows that everything works fine, but the Web client don’t refresh. Only after I enter a record, delete, cancle or save it, it will be refreshed. Is there anyone, whoe give me a tipp, what can I do, to refresh the Webclient without any useraction or to get worked my solution. rg Alfred
asked
3 answers
0

I guess the API REST call is more or less happening in the background and creating new objects for the entity.

If that is the case, from my perspective, it might be little difficult to accomplish what you are trying to achieve.

Because, API will be executed in a different user context than the user who is logged in at this moment.

One solution that you could try is: refreshing the page for every x seconds, This is possible in datagrid.

https://docs.mendix.com/refguide7/data-grid?#refresh-time-in-seconds

This is what I could think off. If your situation is different, please explain it.

answered
0

Yes your assumption is correct. To my mind I was looking for a solution from serverside.

but your solution has exactly the behavior I was looking for. Thanks very mutch.

answered
0

Using pusher or any other push service in your application can also make it possible to make the Client react on an action taken on the server.

answered