0

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?

2
  • Can you check if the columns are listed under site columns? And if the content type is listed under the site content types?
    – baywet
    Apr 27, 2018 at 23:24
  • @baywet the columns are correctly in the content type. However I just want to create a simple list without having to create site columns/content type.
    – Jonathan
    Apr 28, 2018 at 3:58

2 Answers 2

1

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

0

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/

Your Answer

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

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