I have an interesting situation. I want to substitue a list content type for a site content type. I created a solution that uses site columns and site content types. I have older content (webs) that have lists that don't use the new content
types. When I designed the site columns and content types, I was careful to reuse the internal names but I had to use new GUIDs. I want to add the site content type to the list, remove the old list content type (Item, customized using GUI, not
even a schema.xml file), and have the fields assume their site column counterparts. I thought this might be possible based on how provisioning works. Let me explain.
When you create a list schema and specify the content type, you can create a new one or reference an exisiting one (site content type). If you reference, at provisioning, the list instance creates a list content type that is a copy of the site content
type with a new contenttypeid showing the proper heirarchy. Also the fields are specified by the content type. And if you use site columns, the fields are created from the content type. Now these fields have unique names. When the fields
are created from site columns, their are created as list fields using the same GUIDs and same names as the site columns.
I've noticed the internals of sharepoint seem to favor the use of internal names for fields, not GUIDs. So I was thinking, if I add a site content type, it will specify site columns. And because these site columns have the same internal
names as existing list fields, the two content types (existing list ct, and newly copied list ct) would share the same fields and then I could remove the older content type.
But it doesn't seem to work like that. Instead, the provisioning treats the fields separately and uses the different GUIDs causing the new content type (the copy of the site content type) to provision a new set of fields (the site columns) instead
of reusing the existing fields.
I hope that made sense.
Can someone explain why it works this way and if there is anything I can do to make it work the way I envisioned it to. Or explain why my logic is flawed and what I should be doing instead. The ultimate goal is to preserve content but use site
columns and site content types for easier global management of enhancements to fields.
Brian Bedard, MCTS - pioneeringsharepoint.blogspot.com - Twitter:@tigertoy