Pergunta

Eu tenho uma lista em um site do SharePoint onde eu salvo alguns dados.Essa lista foi criada em um processo de ativação de recurso meses atrás!

Agora, eu criei novas melhorias como - adicionou 2 novas colunas ao código (dentro do processo de criação de lista no meu método de ativação do recurso).

minha pergunta vem aqui: posso reimplantar minha solução e reativar meu recurso sem perder nenhum dado na lista?

Qual é a melhor maneira de fazer isso?

Foi útil?

Solução

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

Outras dicas

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 em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top