Hi!
I've recently run into this article Prevent deletes of projects in a Project environment by creating a Microsoft Dataverse Plugin - Project for the web | Microsoft Learn. Why is this plugin needed? Couldn't we just manage access in Dataverse by changing security roles?
In our company we have an app for managing projects (PMIS) made in Power Apps, tables are in Dataverse. Admin of this app tried changing security roles to prevent deletion, but it didn't help.
In my apps I've always restricted deletion by managing security groups. But this article mentions "Project for the Web", "project environment" and our app also uses project "msdyn_project" table (which is not a custom table). So, I am wondering maybe I am missing something and if this table has some exceptions.
I don't have an admin access to the environment of this app, so I don't know all the details about this app.
Certainly depends on your use case, but I would agree that you are probably better off using security roles if possible.
One thing security roles can't prevent is other administrators from deleting records. Or perhaps the use case is having scheduled periods of time where deletion is allowed. A plugin that prevents deletion can prevent even SysAdmins from deleting records. Administrators could disable the plugin and continue on deleting but it's that extra step that may prevent accidents or novice administrators from making mistakes.
Perhaps you have an outage period scheduled every week at a certain time. Instead of modifying roles you could create a plugin that automatically allows deletion of records at a certain period of time at whatever interval you choose. I'm sure there are more use cases out there but it gives you an idea where delete preventing plugins may come in handy.
HI,
There could be different use case to have plugin on the delete , but you are correct if you want to handle it through delete permission you can do that, if user don't have delete permission they won't be able to delete it. If user don't have delete permission and they are still able to delete, please review if they are not part of any team where higher security role (which have delete permission) assigned to team because any member of the team will automatically inherit all permission.
Please share some screenshots if possible.
In Portal Management under security there is option of creating web role, where you assign rights.
I hope now it is clear?
Sorry, what do you mean by web role?
I think you can create web roles and you can provide the rights to that particular web role,In that case user will not have enough privilege to delete any record
If this was your solution, you can leave a like and accept it as a solution 🙂
mmbr1606
22
Super User 2025 Season 1
stampcoin
19
Michael E. Gernaey
15
Super User 2025 Season 1