pnp / sp-dev-site-scripts

Repository for sample SharePoint site designs and site scripts
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview
MIT License
162 stars 68 forks source link

Option for adding the column into all the content types is missing #24

Open Prakash-Ramasamy opened 5 years ago

Prakash-Ramasamy commented 5 years ago

Category

Expected or Desired Behavior

While adding a column to a list, we should get an option for adding it into all the content types.

"verb": "createSPList", "listName": "Site Pages", "templateType": 119, "subactions": [ { "verb": "addSPField", "fieldType": "Text", "displayName": "Customer Name", "isRequired": false, "addToDefaultView": true, "addToAllContentTypes":true (This option is missing) } ]

Observed Behavior

While adding a site column or list column to the list/library manually, there are two options available "Add to all content types" and "Add to default view"

image

But while doing the same thing using the site script the "Add to all content types" option is missing.

Steps to Reproduce

Attach the below site script to a site design and create a site with that template. The result will be under the Site Pages library of the newly created site.

$teamScript=@' { "$schema": "schema.json", "actions": [ { "verb": "createSPList", "listName": "Site Pages", "templateType": 119, "subactions": [ { "verb": "addSPField", "fieldType": "Text", "displayName": "Customer Name", "isRequired": false, "addToDefaultView": true, "addToAllContentTypes":true } ] }

], "bindata": { }, "version": 2 } '@