Hello!
Here is a rough outline of what we wish to achieve.
We have a page-extension, a table and a codeunit exposed as webservice. The page just displays some fields of the table and the webservice acts as an entrypoint for an external system to push some data to the table.
Assume I have a user who has the page open in Business Central, they do some work and go to the external platform without closing the page they're currently on. On the external platform they initiate a data sync to the webservice, which will modify some related things and update a timestamp on the table when it finishes.
What we would like is to raise an event in the webservice which the page can subscribe to. When the subscriber receives the event a notification is displayed on the already open page of the user.
We have already tried to make this work with standard integration events. We even tried reacting to the onValidate() trigger of the timestamp in the table. But it seems that the subscribers cannot pick up events raised in the webservice codeunits. I assume this is because the publisher & subscriber exist in different sessions?
Is there another way to achieve this kind of real-time notification on an already open page? We currently solve it by checking if the notification should be displayed when the page fetches the current record it needs to show, but this does not entirely cover our case.