SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.23k stars 989 forks source link

Provision SharePoint assets from your SharePoint client-side web part #9509

Open akshataggrwal opened 4 months ago

akshataggrwal commented 4 months ago

I am trying to provision SharePoint assets(list, site columns, content types) as part of my SPFx webpart deployment. After reviewing the documentation available at (https://learn.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/provision-sp-assets-from-package) I was able to create assets in SharePoint and add new columns(using upgrade actions) when I upgrade my SPFx.

However, is it possible to update/remove/delete existing things like columns and lists as part of the upgrade process. Is there any documentation available that can guide me on this?

Thanks

Originally posted by @akshataggrwal in https://github.com/SharePoint/sp-dev-docs/discussions/9508

ghost commented 4 months ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

andrewconnell commented 4 months ago

You can use the <UpdateAction> element to control what happens when you go from one version of the Feature to another, but there's no way to remove/clean up existing things.

Generally speaking, SharePoint never deletes/cleans up after itself, instead deferring that work to the developer (so nothing is surprisingly removed).