Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Add support for setting AllowDeletion using Set-PnPField #2766

Merged
merged 5 commits into from
Jul 7, 2020

Conversation

jensotto
Copy link
Contributor

Type

  • Bug Fix
  • New Feature
  • Sample

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 pnp/PnP-Sites-Core#2688

@KoenZomers KoenZomers added the status:Awaiting PnP Sites Core PR 🚧 Waiting for a PR in PnP Sites Core to be merged first label Jun 25, 2020
@jensotto jensotto changed the base branch from master to dev June 28, 2020 11:27
@KoenZomers KoenZomers removed the status:Awaiting PnP Sites Core PR 🚧 Waiting for a PR in PnP Sites Core to be merged first label Jun 29, 2020
@KoenZomers KoenZomers removed their assignment Jun 30, 2020
@KoenZomers KoenZomers added the status:checked and ready for merge ✔ PR has been checked and is ready for merge label Jun 30, 2020
@KoenZomers
Copy link
Collaborator

Thanks @jensotto !

@erwinvanhunen erwinvanhunen merged commit 94e4381 into pnp:dev Jul 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:checked and ready for merge ✔ PR has been checked and is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants