0

I am adding a content type using site script to a library which is already having three content types. Now I want to make my custom content type as default one. Is it possible to make a content type as default using site script?

The code I am using for adding content type is below:

{
  "verb": "createSPList",
  "listName": "Project List",
  "templateType": 100,
  "subactions": [
    {
      "verb": "addContentType",
      "name": "CustomProject"
    }
  ]
}

Thanks in advance

0

As per MS documentation it is not possible to make a content type as default for a list /library using site scripts , but it is possible with power shell commands.

0

Try this.

Project Document will be default content type:

        {
          "verb": "addContentType",
          "name": "Project Document"
        },
        {
          "verb": "removeContentType",
          "name": "Document"
        }

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.