Is it possible to change the ID of a list with Sharepoint? With a feature or something like that?
+1
A:
If you are talking about this property then no, I don't think you can change it. It is the unique identifier that's used in the database to link to the content.
Hugo Migneron
2010-06-17 18:49:13
darn.. I hate that when you deploy lists with a feature, the ID will be changed from one environment to the other... Is there any way to create it with a specific ID then?
tinky05
2010-06-17 20:21:48
No there isn't. Even when you specify an ID in the list definition (in the XML or in the code) the ID is ignored and a new one is used. That way there are never 2 lists with the same ID.If you want to identify your lists on 2 different environments, I suggest you use the web and list name combined. Your webs should have the same URLs I assume (relative URL) and list names are unique inside a web.
Hugo Migneron
2010-06-18 13:59:36
A:
In general this possibility would go against SharePoint design, because theoretically you could end up with two lists with the same id. Could you please explain why do you need to do this?
Vojtech Nadvornik
2010-06-18 08:29:57
A:
I've found an alternative solution for dataviews that worked for me. Instead of using "ListID", I use ListName"... Just do a "find and replace" on ListID in your dataview XML, then replace the ID by the list name. It will be the display name, but at least it will work OK with deployments!
tinky05
2010-07-06 13:47:47