Ok, so far so good when it came to site columns, content types and, if applicable, connecting page layouts to them. This stucture is really powerful and extremetly useful to implement your organizations metadata structure, document template and to control the usage and layouts. It's been a great improvement for ECM in SharePoint and there had been a lot of positive response about them during some presentations and demos I did. Ok, so far so good.
But then, there are like you would expect, some issues to deal with when implementing site columns and content types. There might be solutions of workarounds, but due to the lack of documentation it is hard to find out. Some of the problems we run into:
- Creating lookup site columns in features. The lookup link can be achieved by entering the lists GUID. But what to do when you want also want to create the list instance using a feature. The guid is randomly set, so the site column feature is never aware of the new GUID.
- Setting required fields in a site column feature. There is a tag called 'required', and the intellisense tells us to use 'True', 'true' or 'TRUE'. After trying 3 times it turns out to be 'TRUE'.. why are the others there?
- The rendering of Choice site columns in the page layout. It works, but why are the dropdowns rendered differently?
UPDATE: the rendering has something to do with the number of items in the list. The custom rendering enables filtering in the dropdown (see image below) Thanks to Matthew Cosier for mentioning:
- The Content Type ID property. After looking and searching, someone has found out that the content types inherit from other types using the ID, which is constructed in a very, lets say, interesting way. Check out the SDK how to construct them.
<-- this is an ID, try to click it :)
But then, in my opinion one of the most important things for ECM, the lack on information about versioning of those site columns and content types. When happens when you want to update an existing content type, with a lot of documents based on that content type? Also for pagelayouts.. what happens if you remove a column or change the column type? You cannot expect an organisation to have its metadata structure fully cristalized and thought through. When updating pagelayouts using a feature (the best practice), it will simply not deploy...
When diving into the SharePoint SDK we discover the following:
The SPContentType class does have a version property. This MUST but the solution for different versions. Although there is no documentation, we did some testing using this version property and content types. Unfortunately, no results.
Then under the Content Type element in Content Type features (http://msdn2.microsoft.com/en-us/library/aa544268.aspx), the SDK says the following:
Version: reserved fo furture use
I hope they do not think that all of the MOSS implementations never need the versioning functionality right now.
So, does anyone of you have experience with versioning of site columns and content types using features? Please drop me a line if you do ;). Maybe you can also answer one of the other questions?