1

I got a simple cusom list with some columns created in Visual Studio. these columns are from a contenttype (also created in visual studio too). It was asigned to it and works very well.

I deployed, my sharepoint provider hosted app, it to my sharepoint online system. It works very well.

Now I added a new column to the contenttype. Deployed it and it won't display on the list. But the list was recreated.

So I recreated the list in my visual studio. I thought this sooled my problem. But it doesn't the new column doesn't appear in the list.

So my questions:

  1. Is that way of deploying a new column the right way?
  2. Is it always needed to recreated the list is one column wil be added?
  3. Does there exist an automated upgrade function like Entytyframworks "Hey theres a ne schmea so i migrate it"? :)

Thx a lot.

1 Answer 1

2

How are you adding columns in Content Type? Declarative.. meaning XML?

If yes, than you will either have to write Feature Upgrade Actions; specially check the <AddContentTypeField> where PushDown attribute decides whether to push the new field in the lists/libraries where the content type is being used or not..

OR

We (personally) have a custom Feature Event Receiver which adds the new fields programmatically and update the existing lists/libraries that are using the Content Type.

However, deleting the list and recreating should give you the new columns.. But it's not feasible all the time, specially when users are already using the list..

1
  • Hi thx for your reply. Yes i do it declarative. So i must use feature upgrade actions. At the moments it's not productive but i was worried about the upgrade for future versions. Thx for your hint with the upgrade actions :)
    – Sascha
    Commented May 11, 2014 at 11:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.