So here what I want to achieve: I want to create an event that runs after I create a new object in the database. And this function has to dispatch a custom event. So I use the backendless afterCreate method: Backendless.ServerCode.Persistence.afterCreate(); And Backendless.Events.dispatch() non-blocking method to dispatch a custom event.
When I save a new object by using the REST API, then the afterCreate() works fine but it does not dispatch the custom event! Another issue is that if I save a new object to the database by using API Services, the afterCreate() method does not run!?
This is the afterCreate() code that I use :
And this is the method of a service I use to save a new object :
I do not know If I use it in the correct way!