Unfortunately there currently isn't such a feature. The platform tries to keep the data completely consistent.
In this case it also means cleaning up uncommitted objects, but still following the necessary rules.
Based on the error message you have here I'm assuming the following is happening.
The error is saying: "UserException: Verwijderen niet toegestaan." This is likely caused by an error configured by the developer, this can be delete prevention or a before/after delete microflow.
While working in the application the platform keeps track of all the objects that have been implicitly inserted in the db (auto-commit). Upon killing a session the platform checks if there are auto-committed objects, if there are the platform will do a Delete action on that same entity.
My first guess is that you have auto-committed entities, which is basically a modelling error if they persist.
Auto-commit happens for example:
- when the user creates a new Order (no commit),
- then creates a new OrderLine which he completes and commits.
- This last commit inserts the OrderLine in the db, but since the OrderLine has an association to the Order which is also being stored in the db the platform auto-commits (inserts) the Order in the database too.
- If the user now closes his browser without explicitly committing the Order the Order record will remain in the auto-commit state.
- Upon killing the session the platform remembers the auto-committed Order and executes a delete on this entity.
- What happens to the OrderLine depends on other configured actions
* If you have cascading delete the OrderLine gets removed as well
* If you have delete prevention you'd get an error like you are having right now
Also see this page for more info on autocommit
As a next step I'd recommend searching (ctrl+f) on the text from this error and making your message a bit more explicit like: Verwijderen van een Order is niet toegestaan. this gives you more context on what is being removed.
Alternatively you can enable TRACE logging of the Core log node. This node prints actions taken in memory and also when auto-committed objects are being removed. Keep in mind this does print a lot of messages, but very useful to find the cause of your case.