Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Implement Values parameter for cmdlet Set-PnPContentType #4392

Open
zenlord opened this issue Oct 6, 2024 · 1 comment
Open

[FEATURE] Implement Values parameter for cmdlet Set-PnPContentType #4392

zenlord opened this issue Oct 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@zenlord
Copy link

zenlord commented Oct 6, 2024

Is your feature request related to a problem? Please describe.
Currently it looks like it is not possible to change (e.g.) the default list content type view. In the GUI, this option can be set using a field labeled 'Welcome Page View', and this field is available in the SchemaXML field of the list content type.
Currently it is possible to "get" the SchemaXML value and make changes to it, but there's no way to replace the SchemaXML value:

> $ct.SchemaXml = $xml.OuterXml
InvalidOperation: 'SchemaXml' is a ReadOnly property.

Describe the solution you'd like

> Set-PnPContentType -List $list -Identity $ct.Id -Values @{SchemaXml=$xml.OuterXml}
Set-PnPContentType: A parameter cannot be found that matches parameter name 'Values'.

OR

> Set-PnPContentType -List $list -Identity $ct.Id -SchemaXml $($xml.OuterXml)
Set-PnPContentType: A parameter cannot be found that matches parameter name 'SchemaXml'.

Describe alternatives you've considered

None - I tried to implement it using CSOM, but didn't get far. I guess the first step would be to replace the 'ReadOnly' value of the SchemaXml property, but I don't know how to do that (or whether that is possible at all)

@zenlord zenlord added the enhancement New feature or request label Oct 6, 2024
@kachihro
Copy link
Contributor

Same question here - provisioned a set of Content Types - and Doc.Sets - but now need to set the "WELCOME PAGE" for the Doc.Set. This can't be done via PNP.PowerShell - only option I saw was a crazy IE.ScreenDriver - to manipulate via the UI - using script...!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants