Open Ruslan-Urban opened 3 years ago
Related: Issue #185
Uh oh. Ran into this as well. I need to add a field to a list content type, not the site content type. This seems impossible right now? cc @PaoloPia
@Ruslan-Urban @PaoloPia @heinrich-ulbricht this still an issue right? I am trying to set default view to content type which is also document set to different default view as for document library default one. It seems in contentype schema were is line:
is were a way to change it via powershell during provisioning?
@Ruslan-Urban @PaoloPia @heinrich-ulbricht this still an issue right? I am trying to set default view to content type which is also document set to different default view as for document library default one. It seems in contentype schema were is line:
is were a way to change it via powershell during provisioning?
I am trying to attempt the same. I would like a PS script to update or set the Document Set > Welcome Page View > ViewId
I tried updating the SchemaXML but it is read-only. Any help is appreciated.
In the current schema
pnp:listInstance
allows to reference content types defined at site level in thepnp:ContentTypeBindings
element. There is no option to define content types at list level, which is currently supported by SharePoint, which includes adding list-level columns to such content types.This restricts from replicating of existing functionality during migrations. Re-defining of content types at site level doesn't work in all cases, e.g. when the content type is referencing fields defined at list level, and a field with exactly the same internal name exists in another list. The field GUIDs would also clash (see Issue #192).
It also causes errors in Get-PnpSiteTemplate.
In the following example, pay attention to the content type
RFE
:In the exported template the RFE content type
0x0120D520008CD19F86358D0F48945657A43A020469
becomes0x0120D520
(Document Set), and the default content type becomes0x0101
(Document)And, the default content type should be RFE, which is a document set, not a document.
To overcome the limitations and address the issues, the following will be required:
pnp:ContentTypes
element topnp:ListInstance