Wednesday, August 6, 2008

Issue with update list with list definition

Recently we are facing problem of updating list created by list definition.
We are using site definition/list definition for SharePoint deployment.

Here is the scenario.

Now after deployment we got a change request, like add a new field in one of the list.
These are the step we followed for the change:
1) Create a column in that list (on developer pc).
2) Generate a schema file for that list (which has newly column added).
3) As we all know we need to change first line of newly created schema
because we have to keep our old feature id, old ID (Guid), old
template type etc…
4) Replace schema file in 12/template/feature/<<your feature folder>>
5) Uninstall / install feature.

This trick works if you create a new list with that definition.
But what we found that for some list this is not working.
In old list we got a problem.
We only have a single column which is “Title” available in new/edit list.
Again if we create a new list with this it works perfectly but if you opens old list then you will get only single title column for insertion and updation.

For resolving this problem, there is one another thing that to be taken care.
There is “<ContentTypes>” tag in schema.xml for list definition
What we have observed is that while taking new definition of List, Content type id is also getting changed.
So that what we had done is keep old contain type id in new schema file.
And bingo…’s working.


Faizal said...

Good tips... pls share more of your experience with us...

Faizal said...

Good tips... pls share more of your experience with us...

Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to