1

Is there any way to use our custom content type as default content type for document library? I have a custom content type in a site collection. Whenever I/others create a new document library, the custom content type should be automatically applied as a default content type. Is it possible to do in SharePoint Online? Can you please suggest some ideas to achieve this?

2 Answers 2

1

There are two methods, check if they're feasible for your requirement:

  1. You can use PowerShell command to set the default content type for library

Reference: How can I setup default content type for a Document Library in SharePoint Online using PowerShell?

  1. Use remote event receiver and select list events with listadded method. And set the SPList.RootFolder.UniqueContentTyperOrder value for default content type.

Reference: Create a remote event receiver in SharePoint Add-ins

1
  • In my case, first solution will not work. But the second solution will work for me.
    – Prakash
    Commented Dec 18, 2018 at 9:19
0

Yes it is possible.

  1. Create a new library so you can create a template.
  2. In the library settings in advanced settings enable management of content types.
  3. Remove content types you don't need, make the default content type first on the list.
  4. Disable management of content types.
  5. Create an template of the library (from the library settings)

Now when your users are creating libraries they can use the new template to do that it will contain the CT you have applied.

2
  • Thank you for your response. It is good idea, but in my case, I don’t want to do anything after site got created. I don’t want to force the users to use a particular template, users should be able to use OOB document library with custom content type as default. Is there any way to do that during the site provisioning itself?
    – Prakash
    Commented Dec 18, 2018 at 5:16
  • This is not good idea. And in SP-Online probably impossible. In on prem you could overwrite the out of the box definitions but they could be overwritten with the updates. Commented Dec 18, 2018 at 9:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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