<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: SharePoint SPListItem quirks</title>
	<atom:link href="http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/</link>
	<description>Just another SharePoint developer blogging</description>
	<lastBuildDate>Tue, 23 Feb 2010 14:04:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<item>
		<title>By: Michael Baltaks</title>
		<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/comment-page-1/#comment-780</link>
		<dc:creator>Michael Baltaks</dc:creator>
		<pubDate>Tue, 01 Dec 2009 00:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks/#comment-780</guid>
		<description>I could have done with some of this kind of information when I was putting together http://sourceforge.net/apps/trac/splistcp - there&#039;s a lot of this sort of issue, and AddFieldAsXml is a serious pain.</description>
		<content:encoded><![CDATA[<p>I could have done with some of this kind of information when I was putting together <a href="http://sourceforge.net/apps/trac/splistcp" rel="nofollow">http://sourceforge.net/apps/trac/splistcp</a> &#8211; there&#8217;s a lot of this sort of issue, and AddFieldAsXml is a serious pain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy</title>
		<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/comment-page-1/#comment-757</link>
		<dc:creator>Roy</dc:creator>
		<pubDate>Thu, 16 Jul 2009 08:10:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks/#comment-757</guid>
		<description>Hi there guys,

Awful quircks :p.
Anyhow, i&#039;ve been trying some things out in sharepoint, specifically, making features multilingual, and well, I came to the conclusion where i had to change all my sourcecode (especially the ItemEventReceivers we coded). So first I had to read those lines of code, then had to conclude that I probably had to change everything.

I believe it&#039;s as follows
SPListItem l_objItem = ...;

l_objItem[&quot;InternalName&quot;] should return the value of that particular field
l_objItem.Fields[&quot;DisplayName&quot;] does the exact same thing.
So you should probably have done

SPListItem.Fields[&quot;Category&quot;].

Could anyone confirm this?</description>
		<content:encoded><![CDATA[<p>Hi there guys,</p>
<p>Awful quircks :p.<br />
Anyhow, i&#8217;ve been trying some things out in sharepoint, specifically, making features multilingual, and well, I came to the conclusion where i had to change all my sourcecode (especially the ItemEventReceivers we coded). So first I had to read those lines of code, then had to conclude that I probably had to change everything.</p>
<p>I believe it&#8217;s as follows<br />
SPListItem l_objItem = &#8230;;</p>
<p>l_objItem["InternalName"] should return the value of that particular field<br />
l_objItem.Fields["DisplayName"] does the exact same thing.<br />
So you should probably have done</p>
<p>SPListItem.Fields["Category"].</p>
<p>Could anyone confirm this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tuan Anh</title>
		<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/comment-page-1/#comment-756</link>
		<dc:creator>Tuan Anh</dc:creator>
		<pubDate>Wed, 15 Jul 2009 09:58:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks/#comment-756</guid>
		<description>thanhk for this.</description>
		<content:encoded><![CDATA[<p>thanhk for this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Burger</title>
		<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/comment-page-1/#comment-707</link>
		<dc:creator>Erik Burger</dc:creator>
		<pubDate>Wed, 22 Oct 2008 06:29:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks/#comment-707</guid>
		<description>Got to love those &quot;quirks&quot; eh? Excellent post, really useful. 

Does anyone have any deas on how we can prevent ourselves and our fellow devs from running into this problem? Use the InternalName attribute? I doubt that would make a difference but maybe I&#039;m missing something. Use an extension method? And how would it look?

It would be interesting to know why MS doesn&#039;t provide a way to get a Field by its InternalName. I&#039;ve run into a major problem using an MS template that references a Field by its DisplayName (details here: http://www.reversealchemy.net/2008/09/10/sharepoint-custom-templates-and-language-packs/). Why not use the InternalName? Wouldn&#039;t that make life easier?

Or am I *really* missing something?

Cheers,
Erik</description>
		<content:encoded><![CDATA[<p>Got to love those &#8220;quirks&#8221; eh? Excellent post, really useful. </p>
<p>Does anyone have any deas on how we can prevent ourselves and our fellow devs from running into this problem? Use the InternalName attribute? I doubt that would make a difference but maybe I&#8217;m missing something. Use an extension method? And how would it look?</p>
<p>It would be interesting to know why MS doesn&#8217;t provide a way to get a Field by its InternalName. I&#8217;ve run into a major problem using an MS template that references a Field by its DisplayName (details here: <a href="http://www.reversealchemy.net/2008/09/10/sharepoint-custom-templates-and-language-packs/)" rel="nofollow">http://www.reversealchemy.net/2008/09/10/sharepoint-custom-templates-and-language-packs/)</a>. Why not use the InternalName? Wouldn&#8217;t that make life easier?</p>
<p>Or am I *really* missing something?</p>
<p>Cheers,<br />
Erik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kipper stiever</title>
		<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/comment-page-1/#comment-84</link>
		<dc:creator>kipper stiever</dc:creator>
		<pubDate>Thu, 08 May 2008 18:35:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks/#comment-84</guid>
		<description>dude, what a PIA! i just ran into the same issue. thanks for the post, this would have taken me 3 days to figure out as well, no doubt.</description>
		<content:encoded><![CDATA[<p>dude, what a PIA! i just ran into the same issue. thanks for the post, this would have taken me 3 days to figure out as well, no doubt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Corra</title>
		<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/comment-page-1/#comment-83</link>
		<dc:creator>Joel Corra</dc:creator>
		<pubDate>Tue, 25 Mar 2008 20:06:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks/#comment-83</guid>
		<description>You could probably turn this into a whole site dedicated to SharePoint quirks. For instance, one I came across recently is that if you update an SPListItem through the object model, and it has a Notes/Comments field with versioning enabled (one of the default fields on a Contact list), it blanks out the Notes field--if you check the version history, it actually shows Notes being set with a blank value.  The original notes then no longer show in any Data Sheet view.  However, that doesn&#039;t happen if you update the item through the regular SharePoint interface.

Bil Simser has also documented at least 2 &quot;quirks&quot; with the AddFieldAsXml method of the SPList:

AddFieldAsXml cannot be used to set the InternalName correctly
http://weblogs.asp.net/bsimser/archive/2005/07/21/420147.aspx
SharePoint basically ignores the InternalName property in the XML definition and uses the DisplayName for the both the internal name and display name.

AddFieldAsXml... I wish this monkey would go away
http://weblogs.asp.net/bsimser/archive/2005/07/27/420766.aspx
The properties of the  node in the XML definition have to be in a certain order, or it throws an error.</description>
		<content:encoded><![CDATA[<p>You could probably turn this into a whole site dedicated to SharePoint quirks. For instance, one I came across recently is that if you update an SPListItem through the object model, and it has a Notes/Comments field with versioning enabled (one of the default fields on a Contact list), it blanks out the Notes field&#8211;if you check the version history, it actually shows Notes being set with a blank value.  The original notes then no longer show in any Data Sheet view.  However, that doesn&#8217;t happen if you update the item through the regular SharePoint interface.</p>
<p>Bil Simser has also documented at least 2 &#8220;quirks&#8221; with the AddFieldAsXml method of the SPList:</p>
<p>AddFieldAsXml cannot be used to set the InternalName correctly<br />
<a href="http://weblogs.asp.net/bsimser/archive/2005/07/21/420147.aspx" rel="nofollow">http://weblogs.asp.net/bsimser/archive/2005/07/21/420147.aspx</a><br />
SharePoint basically ignores the InternalName property in the XML definition and uses the DisplayName for the both the internal name and display name.</p>
<p>AddFieldAsXml&#8230; I wish this monkey would go away<br />
<a href="http://weblogs.asp.net/bsimser/archive/2005/07/27/420766.aspx" rel="nofollow">http://weblogs.asp.net/bsimser/archive/2005/07/27/420766.aspx</a><br />
The properties of the  node in the XML definition have to be in a certain order, or it throws an error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sudhakar</title>
		<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/comment-page-1/#comment-82</link>
		<dc:creator>sudhakar</dc:creator>
		<pubDate>Thu, 12 Jul 2007 09:07:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks/#comment-82</guid>
		<description>really helped me, good job, thanks</description>
		<content:encoded><![CDATA[<p>really helped me, good job, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Online Collaboration + .Net + SharePoint = My Techie Life Adding item to sharepoint 2003 SPList Programmatically &#171;</title>
		<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/comment-page-1/#comment-81</link>
		<dc:creator>Online Collaboration + .Net + SharePoint = My Techie Life Adding item to sharepoint 2003 SPList Programmatically &#171;</dc:creator>
		<pubDate>Thu, 19 Apr 2007 11:29:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks/#comment-81</guid>
		<description>[...] Please visit the original article: http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks for more infomation&#8230;   Posted in SharePoint, .Net. [...]</description>
		<content:encoded><![CDATA[<p>[...] Please visit the original article: <a href="http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks" rel="nofollow">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks</a> for more infomation&#8230;   Posted in SharePoint, .Net. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eddy</title>
		<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/comment-page-1/#comment-80</link>
		<dc:creator>Eddy</dc:creator>
		<pubDate>Fri, 06 Apr 2007 09:08:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks/#comment-80</guid>
		<description>Thanks for this.
It is a disgrace that it is not documented in MSDN.</description>
		<content:encoded><![CDATA[<p>Thanks for this.<br />
It is a disgrace that it is not documented in MSDN.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daz</title>
		<link>http://www.buro9.com/blog/2007/02/26/sharepoint-splistitem-quirks/comment-page-1/#comment-79</link>
		<dc:creator>daz</dc:creator>
		<pubDate>Tue, 03 Apr 2007 10:54:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.buro9.com/2007/02/26/sharepoint-splistitem-quirks/#comment-79</guid>
		<description>it helped a lot!
si&#039; si&#039; ...</description>
		<content:encoded><![CDATA[<p>it helped a lot!<br />
si&#8217; si&#8217; &#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
