Вопрос

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/provision-sp-assets-from-package In the documentation it specifically told us to create fields, add to content type, then add the content type into the list. How do I create a simple list without having to create content type first?

Also I noticed an issue with this sample, the Content Type within the provisioned list isn't actually inheriting/defaulting to the added content type (Cost Center is not exist within Content Type area in the list):

image

But the columns are displayed as if the column belongs locally to the list, not site column. image

Any thoughts?

Это было полезно?

Решение

The sharepoint framework assets provisioning model relies on the feature framework provisioning model (a subset of it). It's generally a best practice to leverage site columns and content types for lists instead of defining everything in the list. However if you still want to go ahead, remove the content type definition, remove the content type reference and move the fields definitions in a fields node within the list definition to look like that https://msdn.microsoft.com/en-us/library/office/bb862047(v=office.12).aspx

Другие советы

I have tried this out. I had to remove the default content type references in the schema.xml. I have documented it in my post http://www.thesharepointguide.com/sharepoint-framework-provision-assets/

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top