How Mendix handling delete objects or list

0
Hi , Sometimes my flow fails at the 'Delete Object' activity, even though I have provided the necessary delete access. I am observing strange behavior while using version 10.24.1. Could you please explain how Mendix handles delete behavior?  
asked
2 answers
0

Hi,

In Mendix, Delete Object depends on both your delete access and the delete behavior on associations. If an entity has related objects set to cascade delete, Mendix tries to delete them too – and the flow can fail if you don’t have rights or if a delete event throws an error.

Check your domain model associations and any before/after delete microflows to spot the issue.

 

Regards

Reemali

answered
0

Hello Raja

 

The delete failing despite having the correct access rights is a classic Mendix scenario, and it's almost always caused by delete prevention rules configured in your domain model's associations, not by user permissions.

Mendix's delete behavior is designed to protect data integrity by checking how an object's deletion would affect other objects linked to it.

 

When you use a 'Delete Object' activity, Mendix doesn't just check your security role. It first inspects all the associations connected to the object you want to delete to see if there are any rules that prevent the action.

These rules are set in the properties of an association. If you double-click an association line in your domain model, you'll see a section for delete behavior on both sides.

The most common reason for a delete to fail is the setting: "Delete object only if it has no associated object(s)".

 

image.png

 

answered