<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>entwicklungsgedanken &#187; List</title>
	<atom:link href="http://www.entwicklungsgedanken.de/tag/list/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.entwicklungsgedanken.de</link>
	<description>Verschiedene Gedanken rund um die Softwareentwicklung</description>
	<lastBuildDate>Thu, 29 Jul 2010 11:09:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>StaticName property differs from list to ContentType (BUG)</title>
		<link>http://www.entwicklungsgedanken.de/2009/01/07/staticname-property-differs-from-list-to-contenttype-bug/</link>
		<comments>http://www.entwicklungsgedanken.de/2009/01/07/staticname-property-differs-from-list-to-contenttype-bug/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 14:31:28 +0000</pubDate>
		<dc:creator>Eric Bartels</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint-Development]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[ContentType]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[StaticName]]></category>

		<guid isPermaLink="false">http://www.entwicklungsgedanken.de/?p=148</guid>
		<description><![CDATA[Today I came across a really annoying bug inside SharePoint. Imagine you create a simple task list and you enable the management of content types. If you get into deeper analysis of the fields inside that list you will notice that the name of the &#8220;Status&#8221; field differs from the one used inside the content-type [...]]]></description>
			<content:encoded><![CDATA[<p>Today I came across a really annoying bug inside SharePoint. Imagine you create a simple task list and you enable the management of content types. If you get into deeper analysis of the fields inside that list you will notice that the name of the &#8220;Status&#8221; field differs from the one used inside the content-type &#8220;Task&#8221;.</p>
<h3>Flow of actions</h3>
<p>Here is what I did&#8230;</p>
<table border="0">
<tbody>
<tr>
<td><a href="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/settings.png"><img class="alignnone size-thumbnail wp-image-152" title="settings" src="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/settings-150x150.png" alt="settings" width="150" height="150" /></a></td>
<td>Enable ContentType-Management</td>
</tr>
<tr>
<td><a href="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/overview.png"><img class="alignnone size-thumbnail wp-image-149" title="overview" src="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/overview-150x150.png" alt="overview" width="150" height="150" /></a></td>
<td>List-Overview with enabled ContentType-Management. The ContentType &#8220;Task&#8221; is attached to the list.</td>
</tr>
<tr>
<td><a href="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/ct.png"><img class="alignnone size-thumbnail wp-image-151" title="ct" src="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/ct-150x150.png" alt="ct" width="150" height="150" /></a></td>
<td>Field overview of the ContentType inside the &#8220;Task-List&#8221;. The field Status is named &#8220;Status&#8221;.</td>
</tr>
<tr>
<td><a href="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/ct-field.png"><img class="alignnone size-thumbnail wp-image-154" title="ct-field" src="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/ct-field-150x150.png" alt="ct-field" width="150" height="150" /></a></td>
<td>Properties of the Field of the ContentType &#8220;Task&#8221; inside the list. The StaticName of the field is &#8220;Status&#8221; as one can see inside the red ellipse.</td>
</tr>
<tr>
<td><a href="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/ct-base.png"><img class="alignnone size-thumbnail wp-image-150" title="ct-base" src="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/ct-base-150x150.png" alt="ct-base" width="150" height="150" /></a></td>
<td>The fields available when navigating to the properties of the ContentType &#8220;Task&#8221; inside the &#8220;Site Content Type Gallery&#8221; of the site collection. <strong>Note:</strong> One can already see that the &#8220;Status-Column&#8221; is named &#8220;Task Status&#8221; here.</td>
</tr>
<tr>
<td><a href="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/ct-base-field.png"><img class="alignnone size-thumbnail wp-image-153" title="ct-base-field" src="http://www.entwicklungsgedanken.de/wp-content/uploads/2009/01/ct-base-field-150x150.png" alt="ct-base-field" width="150" height="150" /></a></td>
<td>If you navigate deeper into the field properties of the base ContentType &#8220;Task&#8221; you see (inside the red ellipse) that here the StaticName is &#8220;TaskStatus&#8221;.</td>
</tr>
</tbody>
</table>
<h3>Bug</h3>
<p>This is definitely a bug. These StaticName properties of the fields should <strong>be the same</strong>! What is even more weird is the fact that the Id&#8217;s of the fields are identical! Both have a guid of &#8220;c15b34c3-ce7d-490a-b133-3f4de8801b76&#8243;!</p>
<p>If you look inside the schema.xml of the default task list (found in <code>12/Template/Features/TaskList/Tasks/schema.xml</code>) you see that the StaticName is set to &#8220;Status&#8221;. If you take a look inside the ContentType-definitions of the sharepoint-core (found in <code>12/Templates/Features/ctypes/ctypeswss.xml</code>) you will notice that the name of the field with the id &#8220;c15b34c3-ce7d-490a-b133-3f4de8801b76&#8243; is set to &#8220;Status&#8221;, too.</p>
<p>So I cannot explain why the fields in the ContentType &#8220;Task&#8221; are prefixed with &#8220;Task&#8221;. The field DueDate is also affected. Inside lists its StaticName is &#8220;DueDate&#8221; inside the ContentType its named &#8220;TaskDueDate&#8221;.</p>
<h3>Conclusion</h3>
<p>It seems that you can&#8217;t even rely on the StaticName! Instead always make use of the Id of a field!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.entwicklungsgedanken.de/2009/01/07/staticname-property-differs-from-list-to-contenttype-bug/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Disable the document-template for a list via code (DocumentTemplateUrl)</title>
		<link>http://www.entwicklungsgedanken.de/2008/10/30/disable-the-document-template-for-a-list-via-code-documenttemplateurl/</link>
		<comments>http://www.entwicklungsgedanken.de/2008/10/30/disable-the-document-template-for-a-list-via-code-documenttemplateurl/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 17:02:26 +0000</pubDate>
		<dc:creator>Eric Bartels</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint-Development]]></category>
		<category><![CDATA[Disable]]></category>
		<category><![CDATA[DocumentTemplate]]></category>
		<category><![CDATA[List]]></category>

		<guid isPermaLink="false">http://www.entwicklungsgedanken.de/?p=67</guid>
		<description><![CDATA[A current requirement was to disable the DocumentTemplateUrl for a SPList-instances. So the &#8220;New document&#8221; does not appear anymore inside the list. The trick So there is no such property available in the SPList-class which allows us to disable the DocumentTemplateUrl. In order to &#8220;get the property&#8221; we need to cast the object. // web [...]]]></description>
			<content:encoded><![CDATA[<p>A current requirement was to disable the <code>DocumentTemplateUrl</code> for a <code>SPList</code>-instances. So the &#8220;New document&#8221; does not appear anymore inside the list.</p>
<h3>The trick</h3>
<p>So there is no such property available in the <code>SPList</code>-class which allows us to disable the <code>DocumentTemplateUrl</code>. In order to &#8220;get the property&#8221; we need to cast the object.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// web was declared earlier</span>
SPDocumentLibrary docLib <span style="color: #008000;">=</span> <span style="color: #000000;">&#40;</span>SPDocumentLibrary<span style="color: #000000;">&#41;</span> web.<span style="color: #0000FF;">GetList</span><span style="color: #000000;">&#40;</span>SPUrlUtility.<span style="color: #0000FF;">CombineUrl</span><span style="color: #000000;">&#40;</span>web.<span style="color: #0000FF;">ServerRelativeUrl</span>, <span style="color: #666666;">&quot;Lists/doclib&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
docLib.<span style="color: #0000FF;">DocumentTemplateUrl</span> <span style="color: #008000;">=</span> <span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Empty</span><span style="color: #008000;">;</span>
docLib.<span style="color: #0000FF;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>Thats it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.entwicklungsgedanken.de/2008/10/30/disable-the-document-template-for-a-list-via-code-documenttemplateurl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
