pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
989 stars 662 forks source link

Add support for setting AllowDeletion using Set-PnPField #2766

Closed jensotto closed 4 years ago

jensotto commented 4 years ago

Type

Related Issues?

N/A

What is in this Pull Request ?

Adds the possibility to set and get the AllowDeletion for a field. This is not exposed by CSOM, but is available by manually manipulating the SchemaXML for the field. This can be usefull to prevent users from accidentally deleting a field and loosing data contained in that field for all items in a list. Also it will make it possible to prevent deletion of a field from site columns.

A UserVoice request has been created to expose this in CSOM. In the meantime this workaround should cover it. https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform/suggestions/40701070-expose-field-property-setter-for-allowdeletion

This PR requires the PR https://github.com/pnp/PnP-Sites-Core/pull/2688

KoenZomers commented 4 years ago

Thanks @jensotto !