Portal2 - Trigger refresh of Scheduler after saving edit in Record Viewer

Hi,

I am currently working on a setup where I use the Scheduler in combination with a Record Viewer. Since we want to ensure that users do not change the timeslots by mistake we wish to use the Scheduler to move tasks between resources and the Record Viewer to input a change in the time of the task if required.

This all works well, apart from a bug with the Record Viewer still using time offset even though it is disabled (reported as a bug), however, when we input a new time in the record viewer and commit we would like to trigger a refresh of the Scheduler Portlet. Is there a way to accomplish this in Portal2? I know there was a way to trigger a refresh in Portal1, but I don’t remember the setup and I hope you have made it simpler in Portal2.

Summarized the behavior I am looking to create is: When Record Viewer is edited and saved, refresh Scheduler Portlet.

Thank you in advance!

Hi,
I was going to say, simply add a “onRefresh” listener, but it seems that the scheduler can’t listen to the Record portlet right?

For that specific scenario, you could add a portal push event using the flow environment connector in the workflow that updates the scheduler portlet. It is not optimal since it will refresh the scheduler portlet for all users, not just for the user who saved the record. It can also generate some performance issues, and also potentially a listener loop that is hard to detect (a pushes to b, that refreshes a…etc).

So not really recommended, but it could work depending on the scenario.

Hi Ola,

Thanks, that is the exact problem yes. I wanted to set the Scheduler to listen to the Record portlet On refresh, but this was not an available option. Figured that there was another way it was supposed to set up, but I guess I should create a feature request for this then and attempt a work-around with the Flow Environment Connector in the meantime.

On a side note; how do you trigger an update via the Flow Environment connector? This is not referenced in the documentation.

You need the flow environment connector set up first of all.

Then it will pop up a “send refresh” or something like that under a portal folder, see:

I think it is poorly updated but there will also be a portlet refresh option in there.

I can’t check it right now, but if you want to play with it for yourself that’s a start perhaps.

Thank you! There was not a “Send refresh” option, but the Portal Push Notification worked to trigger a refresh after some experimenting. I needed to use the URL: https://ourdomain.com/Novacura.Flow.Dev.Client.Portal2.Web.Api rather than the full URL
https://ourdomain.com/Novacura.Flow.Dev.Client.Portal2.Web.Api/api/ or https://ourdomain.com/Novacura.Flow.Dev.Client.Portal2.Web.Api/, but then it worked at least.

Ah right, for context, this is what it looks like (for me at least on 6.15)