SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why prefer this method?

I just attempted to update a content type I created in a list definition via CAML and had no issues doing it. What is the reasoning behind this best practice?

share|improve this question
up vote 1 down vote accepted

Did you try changing the type of a field in your change? Also, is the content type used in multiple list definitons/list templates?

It might have worked for your case, but if you update it via the event receiver you have full control over what's happening, how you want your lists to adapt to your changes, how you want to convert values in case you change column types, etc.

share|improve this answer
So you are saying changing type and changing content types in any way when used in multiple list definitions then the update will not work properly (via CAML I mean)? – dbobrowski Sep 30 '11 at 12:01
Changing types will not work. On deployment you get the error that there is another field with the same ID. As for the multiple lists, the problem is that in some lists you might have dependencies, like lookups, or calculated fields, that need to be addressed differently and require logic that you cannot cater for using only xml – Jorge Carvalho Oct 1 '11 at 1:58
perfect thanks, marked as answer – dbobrowski Oct 3 '11 at 14:32

Feature receiver updates are very useful when you change the version of the assemblies you are deploying, say from v1.0 to v2.0 - When you upgrade that is what you do right?

When you upgrade from v1.0 to v2.0, you might want to do specific things (like creating new lists or modifying site permissions etc.,) which can be accomplished by event receivers (object model). And you can use CAML to update Content Types where you may want to add just an extra column and push changes to all the lists and libraries which SharePoint will do it for you automatically.

With versions, your change, whether it is just adding a coloum to the content type or complex change using object model, it is recorded.

share|improve this answer
While I appreciate the information here (it is good), it's not really answering the question of why I would prefer one over the other. – dbobrowski Sep 30 '11 at 12:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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