Sharepoint - Replace default "new" action to custom created command SPFX

Unfortunately removing default buttons in not supported in modern SharePoint right now. One alternative is to customize the form in power-apps and remove all the fields from the form. Leaving the form with a label "This form isn't functional".

Now the user is supposed to click the other command button. This is what we did as a work around.


You can always, although it is not recommend, hide buttons with css, with the help of a spfx application customizer.

Lets say you want to hide the "new button", just need to make yout spfx extension import a custom css or sass file with:

  button[data-automationid="newCommand"] {
    display: none;
  }

Tags:

Development