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

2 Answers 2

2

Try this.

Project Document will be default content type:

        {
          "verb": "addContentType",
          "name": "Project Document"
        },
        {
          "verb": "removeContentType",
          "name": "Document"
        }
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.

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.