May 27, 2010

Custom List Definitions: Customization of List Instances

Assume you are creating a custom list definition (without going into details on this part, click here if you want more information) and it gets deployed to the site and you start creating instances of the list all over the place.

John Dickhead, is one of the users of the site, and he really has a thing for change! goes into the site and modifies the list (creates new fields from the interface, adds new views and modifies the current views).

A week after that, your manager comes back to you and asks you to add a new field to the list definition so that it gets applied to all the instances of your list. So you think "Oh, that’s a piece of cake, I just go to my list definition and add the field, reset IIS and everything will get updated auto-magically” right? well, unfortunately that is not completely right and here is the reason:

When MR. Dickhead decided to go and update his list from the interface, he actually disassociated that list instance from the definition and from that point on; any change to the list definition does not get applies to that list.

That being said, you will need to update the list definition, and then create an upgrade methods (I used and STSADM command in my case to update the things that did not get updated).

Happy Coding!

No comments:

Post a Comment