1

I want to hide the New Folder ribbon menu item for all document libraries. I have used this code but it is not working. What am I missing?

<CustomAction
 Id="CustomIdentifier.Ribbon.Documents.New.NewFolder.Hide"
 Location="CommandUI.Ribbon" RegistrationType="ContentType" RegistrationId="0x">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.Documents.New.NewFolder">
        </CommandUIDefinition>
      </CommandUIDefinitions>
    </CommandUIExtension>
  </CustomAction>
2

Go to the settings of your document library and open Advanced settings. Then just disable the functionality for that :)

Disable New Folder command

You can also do this by code C#:

    docLibrary.EnableFolderCreation = false;
| improve this answer | |
  • But I want to do it using customaction or hidecustomaction in sharepoint 2013. – Heena May 16 '14 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.