سؤال

لدي قائمة في موقع SharePoint حيث أحفظ بعض البيانات.تم إنشاء تلك القائمة في عملية تنشيط ميزة منذ أشهر!

الآن، لقد قمت بإنشاء تحسينات جديدة مثل - وأضاف 2 أعمدة جديدة إلى التعليمات البرمجية (داخل عملية إنشاء القائمة في طريقة تنشيط الميزات الخاصة بي).

سؤالي يأتي هنا: هل يمكنني إعادة نشر حلاي وإعادة تنشيط ميزة بلدي دون فقد أي بيانات في القائمة؟

ما هي أفضل طريقة للقيام بذلك؟

هل كانت مفيدة؟

المحلول

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

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى sharepoint.stackexchange
scroll top