On delete on relation leads to System.UnreferencedFile create failed for security reasons
I do have a entity, lets call it Center and a few surrounding entites. These surrounding entities do have relations to the Center entity. Some 1:1 some *:1 and some *:1. All of them do have the “On delete of Center → Delete the surrounding entities too” defined on the relation. Now when i try to delete a Center entity I get the following error: Creating object of type System.UnreferencedFile by user Admin_xyz failed for security reasons: User 'Admin_xyz' attempted to create an object of type 'System.UnreferencedFile', but does not have the required permissions I could not find a UnreferencedFile entity in the Systems package. What is going on here? When i remove all of the “On delete → Delete surrounding”s the error disappears. But as soon as i add one of them, it reappears. I could not reproduce this on a freshly created app (directly with 9.1.0). Background: Mendix 9.1.0 App was migrated from 9.0.5, 8.18 and originally created with 8.16
Upgrade your project to 9.2 or the latest version of Mendix. The 9.1 has bug with permissions when deleting.
Could it be that you do not have access to change the all the references but have only read rights instead of read write rights? I would double check those to make sure you are allowed to change it to empty.
I faced this issue with my project and there is two reasons for that :
first : Please check the user role that trying to delete has the allow delete option at all entities related .
second : Change the delete option to a MF like the bellow :