Ridistribuire la soluzione di creazione dell'elenco in un'attivazione delle caratteristiche

sharepoint.stackexchange https://sharepoint.stackexchange.com//questions/90199

  •  10-12-2019
  •  | 
  •  

Domanda

Ho una lista in un sito di SharePoint in cui salvo alcuni dati.Quell'elenco è stato creato su un processo di attivazione delle caratteristiche mesi fa!

Ora, ho creato nuovi miglioramenti come - ha aggiunto 2 nuove colonne al codice (all'interno del processo di creazione dell'elenco nel mio metodo di attivazione della funzione).

La mia domanda viene visualizzata qui: Posso ridistribuire la mia soluzione e riattivare la mia funzione senza perdere dati nell'elenco?

Qual è il modo migliore per farlo?

È stato utile?

Soluzione

For such cases, we usually have a Code Upgrader feature which adds new columns to the list, set default values and so on..

You need to grab the existing list and add the new columns, it should work fine.. And you just need to activate this Code Upgrader Feature

Altri suggerimenti

Instead of having a completely new feature, as Arsalan proposes, you can use the Feature Upgrade framework (which is actually mentioned in a comment by tyshock above).

Basically, what you have to do is using the Feature Version attribute, and then implement code to handle the FeatureUpgrading event in a Feature Event Receiver. See best practices here

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top