Trigger events on AutoCommit

Hey there, is there any way to trigger the entity commit events on autocommitting an object? I need my before commit event to run the moment the object is really commited to the database (and sometimes it is an autocommit even if I would prefer not to have any autocommits) but autocommits don’t trigger the events. The event is triggerd the moment i do my explicit commit but then it might be too late for a before commit (because the data is already stored to the database). Any solution for this?
3 answers

Learned something about autocommits again, thanks to your question. As an exercise I  implemented Ronald's answer in an ACo_OrderLine. 

Take into consideration that the commit of the Order_UnCommitted can return false.


Could you not fix it when you commit the object that triggers the autocommits? You do not say what you want to do for an action but it seems to me that you could create some submicroflow where you do your stuff and run that microflow after each commit on objects that might trigger autocommits.





It would be great if there would be a possibility for microflows to deactivate Auto Committ behvior. Maybe with a hint about the risk, but it could help to prevent your case in very special situations. Could be something for the ideas forum.