In my previous post, I have articulate how we can use Ribbon workbench to add display rules to show/hide buttons. Introduction of new command designer using Power Fx is also a tool we can use to update the enable or visible rules. Limitation with command designer is that it won’t support legacy button to customize. Sadly we will get this below message on those buttons.

If you are working on a custom entity or introducing a custom button on a standard entity then using command editor the Visibility can be set. Select Show on condition from formula. Use the DataSourceInfo command to verify data source i.e. table access as below. The data source can be any table that is part of the model-driven app.
DataSourceInfo(Accounts, DataSourceInfo.DeletePermission)