You can use after commit events to run your logic. These will be executed on the server at synchronisation.
Only the AfterCreate eventhandler doesn't get triggered is my experience when syncing new objects from the native device. The others (before commit, after commit, after delete, etc) will work.
Maybe you should rethink the logic in the after commit and probably place it in a before commit? The delete action should stay in your after commit though.
Another option would be the ‘sync to device’ action which can be used in microflows called from a nanoflow. Then you can perform your logic before syncing.
The synchronize action has two directions: updating the server database with changes from the local database, and updating the local database with changes from the server database. It has been answered that you can add logic to objects when updating the server database by using event handlers.
Now I am wondering: is there a way to add logic to objects when updating the native local database with changes from the server? After testing I could see that event handler After Commit does not get triggered when retrieving new data from the server (which makes sense of course, nothing is being commited here). Is there any way to achieve this?