<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Alex&#039;s SharePoint Blog</title>
	<atom:link href="http://sharepointcoding.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://sharepointcoding.wordpress.com</link>
	<description>A day in the life of a gadget loving SharePoint/Application Developer.</description>
	<lastBuildDate>Fri, 06 Nov 2009 18:19:41 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Creating a Simple Event Handler for SharePoint &#8211; Part 1 by Stefan Thorpe</title>
		<link>http://sharepointcoding.wordpress.com/2008/08/12/creating-a-simple-event-handler-for-sharepoint-part-1/#comment-123</link>
		<dc:creator>Stefan Thorpe</dc:creator>
		<pubDate>Fri, 06 Nov 2009 18:19:41 +0000</pubDate>
		<guid isPermaLink="false">http://sharepointcoding.wordpress.com/?p=5#comment-123</guid>
		<description>I have created a similar version to stop users self approving there own expenses( see below). however I can&#039;t build it as I get an error saying the name web does not exist in this context. Do I need to declare it?

void SelfApprovalCheck(SPItemEventProperties properties)
        {
            //declare object and assign for current listitem
            SPListItem expenses = properties.ListItem;
            //declare and assign string  for current user name
            string currentUser = properties.UserDisplayName.ToString();
            //declare and assign string creator name
            string creator = Convert.ToString(expenses[&quot;Author&quot;]);
            //Convert the Author into a SharePoint user id
            int userid = Convert.ToInt32(creator.Substring(0, creator.IndexOf(&quot;;#&quot;)));
            //Get the SharePoint user which matches the ID
            SPUser user = web.AllUsers.GetByID(userid);
            //Set the domain login name of the author user
            string creatorName = user.LoginName;
            //Get approved Status
            string approved = Convert.ToString(expenses[&quot;Status&quot;]);
            //Check Approved Status
            if (approved == &quot;Approved&quot;)
            {
                //Compare the two user names to see if they match
                if (creator == currentUser)
                {
                    properties.Cancel = true;
                    //Raise our Error Message to the user
                    properties.ErrorMessage = &quot;You are the creator of this item therefore you cannot Approve it.&quot;;
                }
                else
                {
                    //Allow deletion of the item
                    properties.Cancel = false;
                }
            }

        }</description>
		<content:encoded><![CDATA[<p>I have created a similar version to stop users self approving there own expenses( see below). however I can&#8217;t build it as I get an error saying the name web does not exist in this context. Do I need to declare it?</p>
<p>void SelfApprovalCheck(SPItemEventProperties properties)<br />
        {<br />
            //declare object and assign for current listitem<br />
            SPListItem expenses = properties.ListItem;<br />
            //declare and assign string  for current user name<br />
            string currentUser = properties.UserDisplayName.ToString();<br />
            //declare and assign string creator name<br />
            string creator = Convert.ToString(expenses["Author"]);<br />
            //Convert the Author into a SharePoint user id<br />
            int userid = Convert.ToInt32(creator.Substring(0, creator.IndexOf(&#8220;;#&#8221;)));<br />
            //Get the SharePoint user which matches the ID<br />
            SPUser user = web.AllUsers.GetByID(userid);<br />
            //Set the domain login name of the author user<br />
            string creatorName = user.LoginName;<br />
            //Get approved Status<br />
            string approved = Convert.ToString(expenses["Status"]);<br />
            //Check Approved Status<br />
            if (approved == &#8220;Approved&#8221;)<br />
            {<br />
                //Compare the two user names to see if they match<br />
                if (creator == currentUser)<br />
                {<br />
                    properties.Cancel = true;<br />
                    //Raise our Error Message to the user<br />
                    properties.ErrorMessage = &#8220;You are the creator of this item therefore you cannot Approve it.&#8221;;<br />
                }<br />
                else<br />
                {<br />
                    //Allow deletion of the item<br />
                    properties.Cancel = false;<br />
                }<br />
            }</p>
<p>        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WSS (Windows SharePoint Services) Workflow with ASPX Task Forms Tutorial &#8211; Part 1 by alex350r</title>
		<link>http://sharepointcoding.wordpress.com/2008/11/26/wss-windows-sharepoint-services-workflow-with-aspx-task-forms-tutorial-part-1/#comment-121</link>
		<dc:creator>alex350r</dc:creator>
		<pubDate>Mon, 02 Nov 2009 11:10:48 +0000</pubDate>
		<guid isPermaLink="false">http://sharepointcoding.wordpress.com/2008/11/26/wss-windows-sharepoint-services-workflow-with-aspx-task-forms-tutorial-part-1/#comment-121</guid>
		<description>Craig i&#039;m afraid it&#039;s not done yet, however I know this is one of the most viewed blog posts on here so I probably need to get it done asap.

I will try to do parts 2 and 3 one evening this week.</description>
		<content:encoded><![CDATA[<p>Craig i&#8217;m afraid it&#8217;s not done yet, however I know this is one of the most viewed blog posts on here so I probably need to get it done asap.</p>
<p>I will try to do parts 2 and 3 one evening this week.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WSS (Windows SharePoint Services) Workflow with ASPX Task Forms Tutorial &#8211; Part 1 by Craig</title>
		<link>http://sharepointcoding.wordpress.com/2008/11/26/wss-windows-sharepoint-services-workflow-with-aspx-task-forms-tutorial-part-1/#comment-120</link>
		<dc:creator>Craig</dc:creator>
		<pubDate>Mon, 02 Nov 2009 11:05:39 +0000</pubDate>
		<guid isPermaLink="false">http://sharepointcoding.wordpress.com/2008/11/26/wss-windows-sharepoint-services-workflow-with-aspx-task-forms-tutorial-part-1/#comment-120</guid>
		<description>Part 2 done yet?</description>
		<content:encoded><![CDATA[<p>Part 2 done yet?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WSS &#8211; Rich Text column in Document Library by alex350r</title>
		<link>http://sharepointcoding.wordpress.com/2009/05/28/wss-rich-text-column-in-document-library/#comment-119</link>
		<dc:creator>alex350r</dc:creator>
		<pubDate>Fri, 30 Oct 2009 10:06:53 +0000</pubDate>
		<guid isPermaLink="false">http://sharepointcoding.wordpress.com/2009/05/28/wss-rich-text-column-in-document-library/#comment-119</guid>
		<description>Could you expand on what you mean by &#039;set value of RichText field property to true&#039;, my post was regarding creating a rich text field in the document library which you cannot do unless you use content types.

&#039;Single line of text&#039; or &#039;Multiple lines of text&#039; fields cannot be turned into RichText.

Thanks.</description>
		<content:encoded><![CDATA[<p>Could you expand on what you mean by &#8217;set value of RichText field property to true&#8217;, my post was regarding creating a rich text field in the document library which you cannot do unless you use content types.</p>
<p>&#8216;Single line of text&#8217; or &#8216;Multiple lines of text&#8217; fields cannot be turned into RichText.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on WSS &#8211; Rich Text column in Document Library by olegab</title>
		<link>http://sharepointcoding.wordpress.com/2009/05/28/wss-rich-text-column-in-document-library/#comment-118</link>
		<dc:creator>olegab</dc:creator>
		<pubDate>Fri, 30 Oct 2009 09:00:49 +0000</pubDate>
		<guid isPermaLink="false">http://sharepointcoding.wordpress.com/2009/05/28/wss-rich-text-column-in-document-library/#comment-118</guid>
		<description>Just set value of RichText field property  to true</description>
		<content:encoded><![CDATA[<p>Just set value of RichText field property  to true</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on SharePoint solutions do not retract by ankit</title>
		<link>http://sharepointcoding.wordpress.com/2009/08/05/sharepoint-solutions-do-not-retract/#comment-114</link>
		<dc:creator>ankit</dc:creator>
		<pubDate>Sun, 25 Oct 2009 04:02:41 +0000</pubDate>
		<guid isPermaLink="false">http://sharepointcoding.wordpress.com/2009/08/05/sharepoint-solutions-do-not-retract/#comment-114</guid>
		<description>gajab..it works thanks. :)</description>
		<content:encoded><![CDATA[<p>gajab..it works thanks. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on VseWSS 1.3 CTP March 09 &#8211; Still Buggy by alex350r</title>
		<link>http://sharepointcoding.wordpress.com/2009/10/15/vsewss-1-3-ctp-march-09-still-buggy/#comment-113</link>
		<dc:creator>alex350r</dc:creator>
		<pubDate>Fri, 16 Oct 2009 16:17:11 +0000</pubDate>
		<guid isPermaLink="false">http://sharepointcoding.wordpress.com/?p=304#comment-113</guid>
		<description>Well that was strange, just went to debug my project expecting the same error and this time VseWSS built and deployed the .wsp as well as activating the feature! :p</description>
		<content:encoded><![CDATA[<p>Well that was strange, just went to debug my project expecting the same error and this time VseWSS built and deployed the .wsp as well as activating the feature! :p</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Write to the workflow history list programatically by Malcolm</title>
		<link>http://sharepointcoding.wordpress.com/2008/09/09/wirte-to-the-workflow-history-list-programatically/#comment-112</link>
		<dc:creator>Malcolm</dc:creator>
		<pubDate>Fri, 16 Oct 2009 11:41:53 +0000</pubDate>
		<guid isPermaLink="false">http://sharepointcoding.wordpress.com/?p=50#comment-112</guid>
		<description>I need to get the approval date and the approver of a sharepoint document</description>
		<content:encoded><![CDATA[<p>I need to get the approval date and the approver of a sharepoint document</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on VseWSS 1.3 CTP March 09 &#8211; Still Buggy by Jeremy Thake</title>
		<link>http://sharepointcoding.wordpress.com/2009/10/15/vsewss-1-3-ctp-march-09-still-buggy/#comment-111</link>
		<dc:creator>Jeremy Thake</dc:creator>
		<pubDate>Thu, 15 Oct 2009 23:13:37 +0000</pubDate>
		<guid isPermaLink="false">http://sharepointcoding.wordpress.com/?p=304#comment-111</guid>
		<description>Yes, disappointed it&#039;s still in &quot;CTP&quot; and not RTW! especially if VS2010 isn&#039;t going to be backwards compatible with 2007, 2007 is going to be around for us devs for a long time. I&#039;m just about to start a 2003 migration project!</description>
		<content:encoded><![CDATA[<p>Yes, disappointed it&#8217;s still in &#8220;CTP&#8221; and not RTW! especially if VS2010 isn&#8217;t going to be backwards compatible with 2007, 2007 is going to be around for us devs for a long time. I&#8217;m just about to start a 2003 migration project!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Creating a Simple Event Handler for SharePoint &#8211; Part 1 by alex350r</title>
		<link>http://sharepointcoding.wordpress.com/2008/08/12/creating-a-simple-event-handler-for-sharepoint-part-1/#comment-104</link>
		<dc:creator>alex350r</dc:creator>
		<pubDate>Fri, 18 Sep 2009 07:09:46 +0000</pubDate>
		<guid isPermaLink="false">http://sharepointcoding.wordpress.com/?p=5#comment-104</guid>
		<description>Thanks,

To answer your question in your ItemDeleting event you should be able to call properties.listItem[&quot;FieldName&quot;] = &quot;Delete in Process&quot; and then a  properties.ListItem.Update to commit the changes to the list item. After you have done the item update then try setting properties.cancel = true and the changes should be not be lost.

Let me know how you get on.</description>
		<content:encoded><![CDATA[<p>Thanks,</p>
<p>To answer your question in your ItemDeleting event you should be able to call properties.listItem["FieldName"] = &#8220;Delete in Process&#8221; and then a  properties.ListItem.Update to commit the changes to the list item. After you have done the item update then try setting properties.cancel = true and the changes should be not be lost.</p>
<p>Let me know how you get on.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
