Pregunta

Tengo una lista en un sitio de SharePoint donde guardo algunos datos.¡Esa lista se creó en un proceso de activación de características hace meses!

Ahora, he creado nuevas mejoras como: agregó 2 nuevas columnas al código (dentro del proceso de creación de la lista en mi método de activación de características).

Mi pregunta viene aquí: ¿Puedo redistribuir mi solución y volver a activar mi función sin perder datos en la lista?

¿Cuál es la mejor manera de hacer eso?

¿Fue útil?

Solución

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

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
scroll top