(sorry for my English)
I have a collection of data in which the user adds a message. If _AfterInsert() is triggered, I need this code to pass the last added item to the frontend code of the page.
How it should work:
1.) Any user leaves a message in the data collection. (Already working)
2.) _AfterInsert() triggered and backend code requests the last item, i.e. last item in data collection. (Already working)
3.) After that, the backend code (_AfterInsert() hook) should send the item (in JSON format) to the frontend page code. (I do not know how to do it)
Is it possible to realize this?