0

On the top of the views and forms of my model-driven Power App I have some commands (buttons) I don't need.

I would like to delete or hide e.g. the 'Delete' button when I 'Edit command bar' for a page (=table) in my app.

Classic command to remove

I see a message 'This button is read-only. Legacy button is not supported at the moment.'. The linked page states 'Pre-existing classic commands can't be customized within the command designer until they're migrated to the modern infrastructure. This includes the out-of-the-box commands, which will be migrated incrementally over time. You may continue to use other mechanisms and third-party tools for customizing classic commands.'

How to remove such a command? I will look at Ribbon Workbench if I am allowed to download it.

2 Answers2

2

Yes you can use the Ribbon workbench, backup the entity ribbon and customize the ribbon/command bar based on your need. It’s not encouraged to delete/remove any commands since you’re not using it.

There are other ways to hide them, removing privilege in security role, etc. instead of deleting them.

Normally users other than admins will not see all of them based on role privileges and customizations.

  • Thank you, Arun. For all security roles my user is a member of (directly or through a team I am a member of) e.g. I set the 'Delete' and 'Share' privileges for the custom table of my entity to 'None', and publish the customisations. But I still see 'Delete' and 'Share' commands on the table view. Ideas why? – Konstantina Jun 13 '23 at 16:19
  • @Konstantina Something fishy.. need some investigation on the system.. i guess some other team or roles giving them the permission. When they click the delete button records deleted? – Arun Vinoth-Precog Tech - MVP Jun 13 '23 at 18:07
  • I had an additional role for which I removed the 'Delete' access and it worked better. – Konstantina Jun 14 '23 at 14:10
  • @Konstantina perfect, that’s what I thought :) you can upvote/accept the answer(s) if they helped you. – Arun Vinoth-Precog Tech - MVP Jun 14 '23 at 14:24
1

As Arun has already mentioned, you can use Ribbon workbench to hide legacy buttons, but before that approach, please try to utilize security roles to remove the access.

i.e., removing Delete access to the entity will remove the delete button, same goes for most of the buttons.

Reason being, there are many ways to delete even if the button is hidden, like simple http request from the console window or XRMtoolbox or bulk delete etc. same goes for other privilege based buttons

Harinarayanan
  • 375
  • 1
  • 9
  • Thank you, Hari. For all security roles my user is a member of (directly or through a team I am a member of) e.g. I set the 'Delete' and 'Share' privileges for the custom table of my entity to 'None', and publish the customisations. But I still see 'Delete' and 'Share' commands on the table view. Ideas why? – Konstantina Jun 13 '23 at 16:19
  • you can find how the user gets delete access by opening a record and click on "Check Access" button on top of the form it should tell you which roles are assigned to them "directly or indirectly via teams which gives them the delete access. More information on how to use the "Check Access" feature is explained in the link https://www.inogic.com/blog/2021/02/check-access-to-a-dynamics-365-crm-record-using-check-access-button/ – Harinarayanan Jun 14 '23 at 01:49
  • I removed the 'Delete' and 'Share' access for my role that still had it after I 'checked access'. The buttons are still visible but I see a message I don't have permissions to do the respective actions. – Konstantina Jun 14 '23 at 13:44
  • Please ignore the previous comment. I removed the 'Delete' and 'Share' access for my role that still had it after I 'checked access'. On a view, the buttons are still visible but I see a message I don't have permissions to do the respective actions. On a form, the 'Delete' button is not visible, the 'Share' button is and I can perform the share action. How can I deactivate the share action on the form? Additional buttons I want to deactivate are e.g. 'Process' (once I'm on the entity form page), 'Flow', 'Word Templates', 'Run Report', 'Show Chart'. Ideas how to deactivate those? – Konstantina Jun 14 '23 at 14:10
  • On the views "Delete" button should not be visible if you have no delete access, however if you have limited delete access (user level) there is a possiblity that delete button is visible because of this. – Harinarayanan Jun 14 '23 at 15:45
  • For the Share button it is very strange that you do not have share privileage in the role but u are able to share, which should never be the case, unless you still inherit the share privileage via other roles or shared privileage. I had similar requirement to remove the buttons like "Flow", Word Templates, "Run Report". The only possible way to do this was to edit "Application Ribbon" in Ribbon workbench which changes the global ribbon behaviour in all entities. Just right click the ribbon buttons and select hide – Harinarayanan Jun 14 '23 at 15:46
  • Thank you, Hari. I have set the Share privilege to 'none' for all my roles. I hope I get the Ribbon Workbench tool and will just hide all buttons I need. – Konstantina Jun 14 '23 at 16:31
  • You can use Ribbon workbench as XRM toolbox plugin or as managed solution to the environment, both works perfectly. Please accept my response as answer if it helped. Thanks – Harinarayanan Jun 14 '23 at 16:59
  • I managed to use XrmToolBox to tackle the buttons on some tables. On my main table, I have relationship called `Regarding` to tables `Document Location` and `Sharepoint Document`. My main table form has a tab Documents, using `Documents (Regarding)` table. I can't find a Documents table in my environment. I added both `Document Location` and `Sharepoint Document` tables to my ribbon solution but in XrmToolbox I can't see commands e.g. Document Location, Open Location, Add Location, which I want to remove from the Documents tab on my main entity form. Any ideas how I can remove those commands? – Konstantina Jun 26 '23 at 15:12
  • I saw in the Documents tab the related table used is the `Sharepoint Document` table. When I add this table to my ribbon solution and open it in Xrm, I don't see the document-specific commands I need, just some standard commands (Delete, Assign, etc.). Ideas why? – Konstantina Jun 26 '23 at 15:21
  • I guess, its because these are special views. Most likely its something special like sharepoint list kind. I have never tried to hide them so I'm not a 100% sure of them – Harinarayanan Jun 26 '23 at 15:31