disable record deletion by pressing the delete button and enable it by importing file

Inside a data type records edit page, is there any way to disable record deletion by pressing the delete button (at end of each record) and enable the deletion by importing file?

Best by role access control. Now I can disable deletion access on our xxx-Data class to disable record delete but can not allow it by importing, so importing file to delete is also disabled.

The delete button is dangerous as no double confirmation before deletion. Any way to add a double confirmation before deletion?

@MaxonL16591286

The recommended approach is by using access control. You can use privileges to achieve this, but it’ll disable for all scenarios. The delete icon is present pzDataTableActions section, which is a final rule so it can’t be customized.

@SohamM95

Yes I also would like to use access control.

If I use privileges, any method to distinguish the two diff scenario?

@MaxonL16591286

Nope it cannot be restricted scenario wise.