Feb 21 2018 04:38 AM
Is it currently possible to hide a default Command Bar Button using a CustomAction?
We would like for example to hide the default 'Export to Excel' button.
In the Classic view this could be done by a Custom Action:
<CustomAction Id="RemoveRibbonButtonLibrary" Location="CommandUI.Ribbon" RegistrationId="101" RegistrationType="List">> <CommandUIExtension> <CommandUIDefinitions> <CommandUIDefinition Location="Ribbon.Library.Actions.ExportToSpreadsheet" /> </CommandUIDefinitions> </CommandUIExtension> </CustomAction>
But this doens't work for the Modern button. When we try location 'ClientSideExtension.ListViewCommandSet.CommandBar'. We get error: "The specified properties CommandUIExtension are not supported for client-side custom action".
We also cannot found anything related to hiding a button in the documentation:
Customizing "modern" lists and libraries
Feb 21 2018 05:11 AM
Hi Till now i have not seen a possibility to do that.
Feb 26 2018 10:27 AM
Have you tried the css option . In classic by using chrome and locating ribbon element and setting the style to display:none works perfect.
Feb 26 2018 11:52 AM
May 07 2019 07:21 AM
Any chance you've found a way to do this? I'm looking for the same thing, at the moment, and not having any luck with the modern interface.