<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1309990416922282847</id><updated>2025-08-31T21:14:46.491+09:00</updated><category term="workflow"/><category term="List"/><category term="SharePoint Designer"/><category term="EventReceiver"/><category term="InfoPath"/><category term="Javascript"/><category term="UI"/><category term="XSLT"/><category term="Client OM"/><category term="Information Policy"/><title type='text'>SharePoint Developer Topics</title><subtitle type='html'>No SharePoint, No Life.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-5826750057401634591</id><published>2011-07-27T23:35:00.004+09:00</published><updated>2011-08-14T01:06:41.443+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="List"/><title type='text'>Taking off Anchor Tag in Drop Down List</title><content type='html'>A while ago, I encountered a issue about lookup column in a SharePoint list.&lt;br /&gt;
If lookups items are &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;over 20 items,&amp;nbsp;lookup column changes the visual&lt;/span&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Under 20 items:&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyZq_o28f_QxQswGtOHFpzu0xqF9uLVl-BsywjYi7_A3PRONT_6MRVPxjFb6LzFp-_kyBuCnJl19RbxGmOqSmeP99oZG8gI9lCWyaxO3sZMzRFHWo4E2wcuEzf06D_nS4lOLuu-ndR7-4/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyZq_o28f_QxQswGtOHFpzu0xqF9uLVl-BsywjYi7_A3PRONT_6MRVPxjFb6LzFp-_kyBuCnJl19RbxGmOqSmeP99oZG8gI9lCWyaxO3sZMzRFHWo4E2wcuEzf06D_nS4lOLuu-ndR7-4/s1600/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;b&gt;Over 20 items&amp;nbsp;(You can modify in the drop down list.)&amp;nbsp;:&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOYEaOh_hdBUKsQMpZgQtFIfBDUWlEFxfwLJ683UECNnyvFUj2u4iyEV-DM0jMtbL_x7-jmqbPtZ3mzQNMtDJh8BlygNZdcd_9rmqmKGCJddtWA2pTgK1DaN_CYryLUlxUQBOyfHZTokg/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOYEaOh_hdBUKsQMpZgQtFIfBDUWlEFxfwLJ683UECNnyvFUj2u4iyEV-DM0jMtbL_x7-jmqbPtZ3mzQNMtDJh8BlygNZdcd_9rmqmKGCJddtWA2pTgK1DaN_CYryLUlxUQBOyfHZTokg/s1600/2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
I found the solution not to change&amp;nbsp;the visual if lookups are over 20 items&amp;nbsp;in bellow blog post.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.sharepointings.com/sharepoint-lookups-over-20-items-solution/&quot;&gt;Sharepoint lookups over 20 items solution?&lt;/a&gt;&lt;br /&gt;
(The solution is using&amp;nbsp;DVDropDownList instead of FormField.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I could resolve my issue referencing the post, but I encountered a new problem. The problem is that a&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;lookup column is extended due to anchor tag&lt;/span&gt;&lt;/b&gt; in EditForm.aspx.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSsMqDnU2QcwKqdVFQd0sbNL8hhBxX4ZvnKXusku8S52VYlwRnOT_XnRzQwhs7xDOTytOx6M4DqiHdJXT-_h0pSNKtKncsJrXbCCrqN_ZJCy6_SY2m_bPbAURVKkHvWmjyTzlZrxV04g0/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;56&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSsMqDnU2QcwKqdVFQd0sbNL8hhBxX4ZvnKXusku8S52VYlwRnOT_XnRzQwhs7xDOTytOx6M4DqiHdJXT-_h0pSNKtKncsJrXbCCrqN_ZJCy6_SY2m_bPbAURVKkHvWmjyTzlZrxV04g0/s640/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;The resolution is using xlst &lt;/b&gt;to take off Anchor Tag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code is here. I add xslt code and fix&amp;nbsp;SharePoint:DVDropDownList element.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;lt;td width=&quot;400px&quot; valign=&quot;top&quot; class=&quot;ms-formbody&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&amp;lt;xsl:variable name=&quot;lookup&quot; select=&quot;substring-after(substring-before(/dsQueryResponse/Rows/Row/@test, &#39;&amp;amp;lt;/a&amp;amp;gt;&#39;), &#39;&amp;amp;quot;&amp;amp;gt;&#39;)&quot; /&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp; &amp;lt;SharePoint:DVDropDownList runat=&quot;server&quot; id=&quot;ff4{$Pos}&quot; __designer:bind=&quot;{ddwrt:DataBind(&#39;u&#39;,concat(&#39;ff4&#39;,$Pos),&#39;SelectedValue&#39;,&#39;SelectedIndexChanged&#39;,&#39;ID&#39;,ddwrt:EscapeDelims(string(@ID)),&#39;@test&#39;)}&quot; selectedvalue=&quot;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;{$lookup}&lt;/span&gt;&lt;/b&gt;&quot; datasourceid=&quot;spdatasource1&quot; datatextfield=&quot;Title&quot; datavaluefield=&quot;ID&quot; AppendDataBoundItems=&quot;True&quot; CausesValidation=&quot;True&quot;/&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Also see&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms256071(VS.80).aspx&quot;&gt;substring-before function&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms256455(VS.80).aspx&quot;&gt;substring-after function&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/5826750057401634591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/07/taking-off-anchor-tag-in-drop-down-list.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/5826750057401634591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/5826750057401634591'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/07/taking-off-anchor-tag-in-drop-down-list.html' title='Taking off Anchor Tag in Drop Down List'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyZq_o28f_QxQswGtOHFpzu0xqF9uLVl-BsywjYi7_A3PRONT_6MRVPxjFb6LzFp-_kyBuCnJl19RbxGmOqSmeP99oZG8gI9lCWyaxO3sZMzRFHWo4E2wcuEzf06D_nS4lOLuu-ndR7-4/s72-c/1.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-2025487222687594453</id><published>2011-07-24T22:19:00.003+09:00</published><updated>2011-07-24T22:29:15.137+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="List"/><category scheme="http://www.blogger.com/atom/ns#" term="workflow"/><title type='text'>How to Get Workflow History Programmatically</title><content type='html'>I introduced how to check workflow status in &lt;a href=&quot;http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-check-workflow-status.html&quot;&gt;the last post&lt;/a&gt;.&lt;br /&gt;
&lt;div&gt;Today, I introduce how to get workflow history from Workflow History List. You can find&amp;nbsp;Workflow History List&#39;s URL by using SharePoint Designer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtsFUH-NZQr5_WYxMR_xx6GM60sPAs4GJRyXijgBIbVUYccP_f-TuKu3pC4hRB8u7PJqoCY9MdSD6v99X9UVcPVUpfrv0Z9EbYmKCgYVt0ZBJkdrJuRBFEuA5utjsY35L60bmXO6530ws/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;299&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtsFUH-NZQr5_WYxMR_xx6GM60sPAs4GJRyXijgBIbVUYccP_f-TuKu3pC4hRB8u7PJqoCY9MdSD6v99X9UVcPVUpfrv0Z9EbYmKCgYVt0ZBJkdrJuRBFEuA5utjsY35L60bmXO6530ws/s640/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Workflow History List is here. There are some columns associated with workflow.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTerzpobmxRtQLTaPSj02DBOBZJMtSY5ypA5XFA4s5xhsNrobQG6Tgkhc6WR9Qp2apXYQknz6n_jL-aZud5SkSOOhwnmTqG3xYuePEnFxXwJeB2DwQpGFWYPSPVwX7FQsMSsHbvI3j8IM/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;316&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTerzpobmxRtQLTaPSj02DBOBZJMtSY5ypA5XFA4s5xhsNrobQG6Tgkhc6WR9Qp2apXYQknz6n_jL-aZud5SkSOOhwnmTqG3xYuePEnFxXwJeB2DwQpGFWYPSPVwX7FQsMSsHbvI3j8IM/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The code is here. The code enables to get all workflow status associated each item in SharePoint site. You can modify the code to get a specific list&#39;s workflow status. I identify workflow history list item using&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;&quot;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Workflow History Parent Instance&lt;/span&gt;&lt;/b&gt;&quot; column and &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;&quot;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Primary Item ID&lt;/span&gt;&lt;/b&gt;&quot; column.(see &quot;if&quot; block.)&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Workflow;

// This is Console Application //

SPSite site = new SPSite(&quot;http://sharepoint-site&quot;);
SPWeb web = site.OpenWeb();

foreach (SPList list in web.Lists)
{
    foreach(SPListItem item in list.Items)
    {
        foreach (SPWorkflow workflow in item.Workflows)
        {
            foreach (SPListItem worflowHistoryItem in workflow.HistoryList.Items)
            {
                if ((&quot;{&quot; + workflow.InstanceId.ToString() + &quot;}&quot; == worflowHistoryItem[&quot;Workflow History Parent Instance&quot;].ToString()) 
                    &amp;amp;&amp;amp; (item.ID.ToString() == worflowHistoryItem[&quot;Primary Item ID&quot;].ToString()))
                {
                    Console.WriteLine(item.Name + &quot; : &quot; + worflowHistoryItem[&quot;Description&quot;]);
                }
            }
        }
    }
}
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/2025487222687594453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/07/how-to-get-workflow-history.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/2025487222687594453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/2025487222687594453'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/07/how-to-get-workflow-history.html' title='How to Get Workflow History Programmatically'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtsFUH-NZQr5_WYxMR_xx6GM60sPAs4GJRyXijgBIbVUYccP_f-TuKu3pC4hRB8u7PJqoCY9MdSD6v99X9UVcPVUpfrv0Z9EbYmKCgYVt0ZBJkdrJuRBFEuA5utjsY35L60bmXO6530ws/s72-c/3.png" height="72" width="72"/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-1836113480436754453</id><published>2011-06-26T02:26:00.003+09:00</published><updated>2011-07-24T22:13:52.489+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="List"/><category scheme="http://www.blogger.com/atom/ns#" term="workflow"/><title type='text'>How to Check Workflow Status programmatically</title><content type='html'>Today I&#39;ll show checking all workflow statuses in SharePoint site programmatically. Sometimes you may want to check workflow statuses are error or not.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJX630Ql9BkwdgrGzLvHRfpgoqENoXFjlStoFWxUfaZj3uOoC6nOGji6y-2LEx-MIUlzNk6JFdczgQUVGHnR4dr5DQPg53i5WLobwzkfzwF5kcXqxJ2EYJnZ73XSBZtmvmvkdYIbw_TwI/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJX630Ql9BkwdgrGzLvHRfpgoqENoXFjlStoFWxUfaZj3uOoC6nOGji6y-2LEx-MIUlzNk6JFdczgQUVGHnR4dr5DQPg53i5WLobwzkfzwF5kcXqxJ2EYJnZ73XSBZtmvmvkdYIbw_TwI/s1600/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;You need workflow status name (list column) when you get a item&#39;s workflow status. But you can&#39;t get&amp;nbsp;workflow status name&amp;nbsp;from &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflow.aspx&quot;&gt;SPWorkflow&lt;/a&gt; properties directly. &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;You need to use &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflow.associationid.aspx&quot;&gt;SPWorkflow.AssociationId&lt;/a&gt;&amp;nbsp;property and &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splist.workflowassociations.aspx&quot;&gt;SPList.WorkflowAssociations&lt;/a&gt;&amp;nbsp;property to get&amp;nbsp;workflow status.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;The sample code is here.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;using System;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Workflow;

// This is Console Application //

SPSite site = new SPSite(&quot;http://sharepoint-site&quot;);
SPWeb web = site.OpenWeb();

foreach (SPList list in web.Lists)
{
    foreach (SPListItem item in list.Items)
    {
        foreach (SPWorkflow workflow in item.Workflows)
        {
            try
            {
                Console.WriteLine(&quot;item url : &quot; + item.Url);
                Console.WriteLine(&quot;workflow name : &quot; + list.WorkflowAssociations[workflow.AssociationId].Name);
                Console.WriteLine(&quot;workflow status : &quot; + item[list.WorkflowAssociations[workflow.AssociationId].Name]);
                Console.WriteLine();
            }
            catch (ArgumentException)
            {
                //ArgumentException is throwed if the workflow is not exist in the list column. 
                Console.WriteLine(&quot;Workflow name : {0} is already not exist in List title : {1}.&quot;, 
                    list.WorkflowAssociations[workflow.AssociationId].Name, list.Title);
            }
        }
    }
}
&lt;/pre&gt;&lt;br /&gt;
The result is like this :&lt;br /&gt;
&lt;blockquote&gt;item url : Lists/Announcement01/1_.000&lt;br /&gt;
workflow name : Approval01&lt;br /&gt;
workflow status : 2&lt;/blockquote&gt;Workflow status is displayed as a number. The workflow status number are related to &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.workflow.spworkflowstatus.aspx&quot;&gt;SPWorkflowStatus Enumeration&lt;/a&gt;. For example, number 2 means &quot;InProgress&quot;.</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/1836113480436754453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-check-workflow-status.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/1836113480436754453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/1836113480436754453'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-check-workflow-status.html' title='How to Check Workflow Status programmatically'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJX630Ql9BkwdgrGzLvHRfpgoqENoXFjlStoFWxUfaZj3uOoC6nOGji6y-2LEx-MIUlzNk6JFdczgQUVGHnR4dr5DQPg53i5WLobwzkfzwF5kcXqxJ2EYJnZ73XSBZtmvmvkdYIbw_TwI/s72-c/1.png" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-2573546135939615455</id><published>2011-06-17T02:22:00.001+09:00</published><updated>2011-06-17T02:22:41.472+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Information Policy"/><category scheme="http://www.blogger.com/atom/ns#" term="List"/><title type='text'>How to Disable an Expiration Policy (Retention) on a List Using SharePoint Object Model</title><content type='html'>We usually use&amp;nbsp;Expiration Policy (Retention) in Information Management Policy features.&amp;nbsp;Expiration Policy enables to set expiration date for each item in a list. The item will be deleted when&amp;nbsp;expiration date will come.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhek_B00ys0kA4TtKsxCagiG-lvWIkVecPzm56mhCavLgTnxwdrb6_uAaTwCL-2rP3z8xv36jvjZwU0EgVSrT0HGajbEWKyf2wnVyBrTboaRuiLSD5kCkKN9-qNrHpzjSVedcgVq_O_ztA/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;357&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhek_B00ys0kA4TtKsxCagiG-lvWIkVecPzm56mhCavLgTnxwdrb6_uAaTwCL-2rP3z8xv36jvjZwU0EgVSrT0HGajbEWKyf2wnVyBrTboaRuiLSD5kCkKN9-qNrHpzjSVedcgVq_O_ztA/s640/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you enable or disable&amp;nbsp;Expiration Policy using SharePoint API, it is little bit complicated.&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Expiration Policy including Information Management Policy features is associated list&#39;s ContentType. (not list of itself)&lt;/span&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can see how to enable and create Expiration Policy in bellow blog post.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://blogs.msdn.com/b/jjameson/archive/2011/05/05/using-the-sharepoint-api-to-configure-an-expiration-policy-on-a-document-library.aspx&quot;&gt;Using the SharePoint API to Configure an Expiration Policy on a Document Library&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you delete and disable Expiration Policy, please see bellow program code.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.Office.RecordsManagement.InformationPolicy;

namespace ConsoleApplication3
{
    class Program
    {
        private const string expirationPolicyFeatureId = &quot;Microsoft.Office.RecordsManagement.PolicyFeatures.Expiration&quot;;

        static void Main(string[] args)
        {
            SPSite site = new SPSite(&quot;http://sp2010&quot;);
            SPWeb web = site.OpenWeb();

            SPList list = web.Lists[&quot;Annnounce03&quot;];

            foreach (SPContentType contentType in list.ContentTypes)
            {
                Policy policy = Policy.GetPolicy(contentType);

                if (policy != null)
                {
                    //delete Expiration Policy on the List
                    policy.Items.Delete(expirationPolicyFeatureId);
                }
            }
        }
    }
}
&lt;/pre&gt;&lt;br /&gt;
Tips :&lt;br /&gt;
- You need to add Reference Microsoft.Office.Policy.dll from /14/ISAPI.&lt;br /&gt;
- Expiration Policy is defined as&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;&lt;b&gt;Microsoft.Office.RecordsManagement.PolicyFeatures.Expiration&lt;/b&gt;.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/2573546135939615455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-disable-expiration-policy.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/2573546135939615455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/2573546135939615455'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-disable-expiration-policy.html' title='How to Disable an Expiration Policy (Retention) on a List Using SharePoint Object Model'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhek_B00ys0kA4TtKsxCagiG-lvWIkVecPzm56mhCavLgTnxwdrb6_uAaTwCL-2rP3z8xv36jvjZwU0EgVSrT0HGajbEWKyf2wnVyBrTboaRuiLSD5kCkKN9-qNrHpzjSVedcgVq_O_ztA/s72-c/1.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-7431410124885734459</id><published>2011-06-11T20:18:00.002+09:00</published><updated>2011-06-11T20:22:16.115+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="InfoPath"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint Designer"/><category scheme="http://www.blogger.com/atom/ns#" term="workflow"/><title type='text'>How to Customize Default Approval Workflow (Part.2)</title><content type='html'>&lt;a href=&quot;http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-customize-default-approval.html&quot;&gt;In Part. 1 blog post&lt;/a&gt;, I introduced how to add Person or Group TextBox as CC form in Change Request Task Form. Only adding CC form, It doesn&#39;t work. So, in this blog post, I introduce how to&amp;nbsp;add logic in custom Approval workflow to use CC form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;a href=&quot;http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-customize-default-approval.html&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #999999;&quot;&gt;Part.1 Add Person or Group TextBox in Task Form&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-customize-default-approval_11.html&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Part.2 Add logic in custom Approval workflow&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: #333333; font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cccccc;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;The Steps are here.&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;In Approval - Copy05 Top, click &quot;Edit Workflow&quot; and click &quot;Approval Workflow Task (en-US) Copy&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgR2LXePF0BYZd4OV6QjiXJOkqs7Gob0NAytYFHLGljBSYcyTknLJqxytqt0ZPYMieCfuNuO_tmJdnCT3hyphenhyphenubLzHCAAyitM7hlKsePGgCaWiSA_aty9wYpCSO8uUnE7UrhQK6R7Ks05QA/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;377&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgR2LXePF0BYZd4OV6QjiXJOkqs7Gob0NAytYFHLGljBSYcyTknLJqxytqt0ZPYMieCfuNuO_tmJdnCT3hyphenhyphenubLzHCAAyitM7hlKsePGgCaWiSA_aty9wYpCSO8uUnE7UrhQK6R7Ks05QA/s640/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;Click &quot;Change the behavior of a single task&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUVzm2I9GawdbQpY7R7hDHS730elve8mTtpE_yOy1P9UoQM9SMqWb3oHykelpJnA12hRoh_MWGiqXOKT3h3h33E_-5cC-7NzkC4-g0tk43uMZHnWi7bNAoXh_Lv3tBvfVgg7voVLHTU-A/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;285&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUVzm2I9GawdbQpY7R7hDHS730elve8mTtpE_yOy1P9UoQM9SMqWb3oHykelpJnA12hRoh_MWGiqXOKT3h3h33E_-5cC-7NzkC4-g0tk43uMZHnWi7bNAoXh_Lv3tBvfVgg7voVLHTU-A/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;Add &quot;Set Workflow Variable&quot; in &quot;When a Task Completes&quot; section&#39;s top.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6woWy1LLnAZGGGkKTHFxkSUgzsjgc8Ggy_01Y890Da3WDSwj9Zxz7r4xlPg4Rm5xUB6ncbPGBu97rZM5EEDvi_jsn5tcqKrkndvVnerBTIcR0jZC3RARFnW9MOzmvcJ8radXw479wfFo/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6woWy1LLnAZGGGkKTHFxkSUgzsjgc8Ggy_01Y890Da3WDSwj9Zxz7r4xlPg4Rm5xUB6ncbPGBu97rZM5EEDvi_jsn5tcqKrkndvVnerBTIcR0jZC3RARFnW9MOzmvcJ8radXw479wfFo/s1600/3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;Click &quot;workflow variable&quot; and click &quot;Create a new variable...&quot; from pulldown. Fill in&amp;nbsp;arbitrary name and choose String Type. Press OK.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglkRA7pkUPr_xWQNbwvsi2nZJ5pEKkxWzNQYqqAh92lXIzzY8UaJ-Fan-7T_NnEuKfo94erWL7j8qPJ78DVQY7TYVKHDF9dUMP2bAUGEsgbed3XpkZE_xHEFDEQrq1KRe5u-ADq_GP8f8/s1600/8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglkRA7pkUPr_xWQNbwvsi2nZJ5pEKkxWzNQYqqAh92lXIzzY8UaJ-Fan-7T_NnEuKfo94erWL7j8qPJ78DVQY7TYVKHDF9dUMP2bAUGEsgbed3XpkZE_xHEFDEQrq1KRe5u-ADq_GP8f8/s1600/8.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;Click value and click &lt;i&gt;fx&lt;/i&gt;. Fill bellow parameters.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpLQuj2o_EPAKc6HdmBValUruXVPzwMI3iDDlAAi6kI35Up0gTwaw8qxrFnOZ0mf6Y8KVCre8FUElUL7YLGgygG8Y51SE2GWbBGMUY-BaRr1TPEnQ6YHYmlXt2m-UbXDMvmKB_aFDmo0M/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpLQuj2o_EPAKc6HdmBValUruXVPzwMI3iDDlAAi6kI35Up0gTwaw8qxrFnOZ0mf6Y8KVCre8FUElUL7YLGgygG8Y51SE2GWbBGMUY-BaRr1TPEnQ6YHYmlXt2m-UbXDMvmKB_aFDmo0M/s1600/5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;Click &quot;Current Task:Assigned To&quot; in &quot;When a Task is Pending&quot;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcQQGzH1jUaY5L7FhPiPWpcYzzO00QkrhXBhHp9sY8SfeWktfPdPvn1ngNNfWHqCkQVv1PMHRlGCC9Hi8ckhpL-IZtCeGHpCkFQxIXoe3Xo8Af1mQ20kL-cCYjeZFC9OMeQ_9dVfRRdr0/s1600/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcQQGzH1jUaY5L7FhPiPWpcYzzO00QkrhXBhHp9sY8SfeWktfPdPvn1ngNNfWHqCkQVv1PMHRlGCC9Hi8ckhpL-IZtCeGHpCkFQxIXoe3Xo8Af1mQ20kL-cCYjeZFC9OMeQ_9dVfRRdr0/s1600/6.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;Click icon besides CC. Select &quot;Workflow Lookup for a User...&quot;. And Fill in bellow parameters.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn4wb6660nmpfffWK6gE6cS309d__hEe_v_XFiq2kaDU-VDV3r_qVtRz0qETEpl_cwAZWM0myGIBPYWvJR4N0xLymYsfhfoS1mJDqdelHSICYhTLxs_vaImv2FRbjLKG-XB9G4vUX1r6U/s1600/7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgn4wb6660nmpfffWK6gE6cS309d__hEe_v_XFiq2kaDU-VDV3r_qVtRz0qETEpl_cwAZWM0myGIBPYWvJR4N0xLymYsfhfoS1mJDqdelHSICYhTLxs_vaImv2FRbjLKG-XB9G4vUX1r6U/s1600/7.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;Click OK and publish the workflow.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;The steps were finished. Please confirm that you can get CC email when you run the workflow.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;Tips:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;In the steps, I created a workflow variable in&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&quot;When a Task Completes&quot; section to get CC form content. And I added the workflow variable as a CC address in&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&quot;When a Task is Pending&quot; section.&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;The important point is that you can&#39;t&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;directly&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;get CC form content in&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&quot;When a Task is Pending&quot; section.&lt;/span&gt; When you fill in CC form and click Send in Change Request form of a workflow task, The workflow task is completed and new workflow task is created. CC form content is associated the completed task. So you need to get CC form content in&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace; font-size: 15px; line-height: 20px;&quot;&gt;&quot;When a Task Completes&quot; section.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, FreeMono, monospace;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/7431410124885734459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-customize-default-approval_11.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/7431410124885734459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/7431410124885734459'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-customize-default-approval_11.html' title='How to Customize Default Approval Workflow (Part.2)'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgR2LXePF0BYZd4OV6QjiXJOkqs7Gob0NAytYFHLGljBSYcyTknLJqxytqt0ZPYMieCfuNuO_tmJdnCT3hyphenhyphenubLzHCAAyitM7hlKsePGgCaWiSA_aty9wYpCSO8uUnE7UrhQK6R7Ks05QA/s72-c/1.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-5096872271082170345</id><published>2011-06-02T01:08:00.002+09:00</published><updated>2011-06-11T20:19:11.546+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="InfoPath"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint Designer"/><category scheme="http://www.blogger.com/atom/ns#" term="workflow"/><title type='text'>How to Customize Default Approval Workflow (Part.1)</title><content type='html'>I&#39;m sorry it has been taken long time since previous blog post.&lt;br /&gt;
&lt;div&gt;Today I&#39;d like to introduce &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;how to customize default approval workflow using only SharePoint Designer (with non code).&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;This is new feature in SharePoint 2010. In SharePoint 2007, we couldn&#39;t customize default approval workflow. So you needed to make new own workflow from zero base if you want to customize approval workflow.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I introduce these steps in two blog posts.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;a href=&quot;http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-customize-default-approval.html&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Part.1 Add Person or Group TextBox in Task Form&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;a href=&quot;http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-customize-default-approval_11.html&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #999999;&quot;&gt;Part.2 Add logic in custom Approval workflow&lt;/span&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;OK, I introduce Part1 first, add bellow Person or Group TextBox as &lt;b&gt;CC&lt;/b&gt; in ChangeRequest in Task Form.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFCRmRsq-kU9cZL7oTnzkzb-TMAWPxpr7Jg2kx5kuX_TstuBUUccmzBWbFC6o8MTypEm7G_qz-XU1ieelz_MNlinCtZTApvu6xxE-a3gQwkTaD6S6ZqfZtIWX72P3d1j7XhFZwKSyDqWM/s1600/13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFCRmRsq-kU9cZL7oTnzkzb-TMAWPxpr7Jg2kx5kuX_TstuBUUccmzBWbFC6o8MTypEm7G_qz-XU1ieelz_MNlinCtZTApvu6xxE-a3gQwkTaD6S6ZqfZtIWX72P3d1j7XhFZwKSyDqWM/s640/13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;The Steps are here.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;First create a copy of default Approval Workflow in SPD. Click Copy and Modify and create new copy of default Approval Workflow.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhNBH5x1U5PxfZJcKKONYwUysDNcYJssfqbDtdp1vTscsK9easRN0z8PCmlQJR5R4wv2pUiTkIW2GnsHVvdvLcp92t2cr9mxZ1QoKpuhnI4r56JB2EeJ80LPrORn-EF3pydhN_M-0pvRQ/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;189&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhNBH5x1U5PxfZJcKKONYwUysDNcYJssfqbDtdp1vTscsK9easRN0z8PCmlQJR5R4wv2pUiTkIW2GnsHVvdvLcp92t2cr9mxZ1QoKpuhnI4r56JB2EeJ80LPrORn-EF3pydhN_M-0pvRQ/s640/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Click Approval Workflow Task.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjEMl3L227OHm5zqGOwsdR0Rg4YzU23oYWg1FLqnatMn_xn7Jn2TjC22cCja6ymoE-EaesaKP6TzihezYc2j9_3AbQ8HmIPWrNVqYSu7nwRZAc5gzQtZ9py9Kgztg9FloiF9l7f-M3As0/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjEMl3L227OHm5zqGOwsdR0Rg4YzU23oYWg1FLqnatMn_xn7Jn2TjC22cCja6ymoE-EaesaKP6TzihezYc2j9_3AbQ8HmIPWrNVqYSu7nwRZAc5gzQtZ9py9Kgztg9FloiF9l7f-M3As0/s1600/2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Click New in Task Form Fields to create CC as Person or Group Field.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGm2tNU2HD6-eq5wodvm8vNfQX474KPgioun3FpqOf42eVfLlXjByDtuTQV89FsG9fJkkw7k5JN3WoysC5U8vEbzHu0-WiyiorcXr_mCi9NNwcUSVLjpVg6Pfjk9fMtnCJ_E7HWP882WY/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGm2tNU2HD6-eq5wodvm8vNfQX474KPgioun3FpqOf42eVfLlXjByDtuTQV89FsG9fJkkw7k5JN3WoysC5U8vEbzHu0-WiyiorcXr_mCi9NNwcUSVLjpVg6Pfjk9fMtnCJ_E7HWP882WY/s640/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Fill in these TextBox, choose Person or Group in Information type, and click Next.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX4xJkV70PqNsIIIk_l79-HAa-1uUctlD515_v3jlx3_Bisd37laaCEmEtXwySmst8wb7gF_bKKm_0ad1zwPNM41cB668Q-YcTse6HtdFsN-xfQPLNFhXCIHE-bRJOAAKQDjmk9KpxMBE/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX4xJkV70PqNsIIIk_l79-HAa-1uUctlD515_v3jlx3_Bisd37laaCEmEtXwySmst8wb7gF_bKKm_0ad1zwPNM41cB668Q-YcTse6HtdFsN-xfQPLNFhXCIHE-bRJOAAKQDjmk9KpxMBE/s1600/4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Click Finish.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitapdAmwK8gbwX-CG5_6QQQI58KzG1w_76rMTdzW_Yq_AbBHUM0pW42EPG9GNqV7cBgHPeTUX6_NJSa7Pm34iyjZ8QTS1YO5ybaYkrmf0GMEq95mcmXz02fzZOCKZHJ1ED7LXQNoOBUfo/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitapdAmwK8gbwX-CG5_6QQQI58KzG1w_76rMTdzW_Yq_AbBHUM0pW42EPG9GNqV7cBgHPeTUX6_NJSa7Pm34iyjZ8QTS1YO5ybaYkrmf0GMEq95mcmXz02fzZOCKZHJ1ED7LXQNoOBUfo/s1600/5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Save and Publish the .Approval Workflow.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Back to Approval - Copy05 page. Click Approval Workflow Task in Form.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_tuVbsUK0Nu5BqRrbfKfpmyZ0EeeQj1ypn8L7JeRdMqoCmB12IWGFlrCf5N_0KW4_WQ5FPN2EytVaRbRT7dRZzPxRtTgSzJmwx5utTTGOu0qlDFaQzyC-_LaIGKnktCfAyhHeIQaKZfc/s1600/8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;157&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_tuVbsUK0Nu5BqRrbfKfpmyZ0EeeQj1ypn8L7JeRdMqoCmB12IWGFlrCf5N_0KW4_WQ5FPN2EytVaRbRT7dRZzPxRtTgSzJmwx5utTTGOu0qlDFaQzyC-_LaIGKnktCfAyhHeIQaKZfc/s640/8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Task Form is opened in InfoPath 2010. Check the CC form which was created previous step.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBsFDbfEGGHVqSNQLxn4rIl2qZ3h7PCU8NjdndpWsbFGVAtgo-hNQpBI6IBXGWSDJYht_I6gNiby_v3XJ_uAPgSnWPI5Jz0hR0mICZWWsEIAThpcSr5cbDN5KJAdpwGALPb5tNpYRg91o/s1600/9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;352&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBsFDbfEGGHVqSNQLxn4rIl2qZ3h7PCU8NjdndpWsbFGVAtgo-hNQpBI6IBXGWSDJYht_I6gNiby_v3XJ_uAPgSnWPI5Jz0hR0mICZWWsEIAThpcSr5cbDN5KJAdpwGALPb5tNpYRg91o/s640/9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Select CC Row and copy it(Control + C). Delete&amp;nbsp;CC&amp;nbsp;Row&amp;nbsp;from default form.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkb7o3OzbpgUoR9i1yC2J8iORjblyJqsqh6BdBzXNEPhL9QZsqaJF0BFrGuRGi0RAQQY84WE8_itvhqN-QuDKlnXF-IVKtBEZjhqoeTvuuhupWU-Pm6xZKRodxho31J2bQSizDj06a19M/s1600/12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;52&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkb7o3OzbpgUoR9i1yC2J8iORjblyJqsqh6BdBzXNEPhL9QZsqaJF0BFrGuRGi0RAQQY84WE8_itvhqN-QuDKlnXF-IVKtBEZjhqoeTvuuhupWU-Pm6xZKRodxho31J2bQSizDj06a19M/s640/12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Tips : You can also add CC from Fields property menu. But you can&#39;t resolve names in CC by using Enter key if you drag &amp;amp; drop CC from Fields property menu to&amp;nbsp;ChangeRequest&amp;nbsp;form. So you had better use the copy from default form.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Click Page Design Tab and choose ChangeRequest from View pulldown.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiElTYkv6hZiyPbq0PhhCNachFt3E7uZo4h9fe8qetKIxcYHCX32xdyC4xKyhopyTFdMAeAKnRiXw0Y1nLMfpyqG-GIyEUpaXCCaZV6ZgGLmprosEpUEpBqDaJx4T7JWHFBKFr2nXpYEMg/s1600/11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiElTYkv6hZiyPbq0PhhCNachFt3E7uZo4h9fe8qetKIxcYHCX32xdyC4xKyhopyTFdMAeAKnRiXw0Y1nLMfpyqG-GIyEUpaXCCaZV6ZgGLmprosEpUEpBqDaJx4T7JWHFBKFr2nXpYEMg/s1600/11.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Add new Row and paste CC Row (Control + V) in ChangeRequest form.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFCRmRsq-kU9cZL7oTnzkzb-TMAWPxpr7Jg2kx5kuX_TstuBUUccmzBWbFC6o8MTypEm7G_qz-XU1ieelz_MNlinCtZTApvu6xxE-a3gQwkTaD6S6ZqfZtIWX72P3d1j7XhFZwKSyDqWM/s1600/13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFCRmRsq-kU9cZL7oTnzkzb-TMAWPxpr7Jg2kx5kuX_TstuBUUccmzBWbFC6o8MTypEm7G_qz-XU1ieelz_MNlinCtZTApvu6xxE-a3gQwkTaD6S6ZqfZtIWX72P3d1j7XhFZwKSyDqWM/s640/13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Save the InfoPath form to local and Publish it.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;Steps were finished.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;I&#39;ll introduce how to use the CC in next blog post.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/5096872271082170345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-customize-default-approval.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/5096872271082170345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/5096872271082170345'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/06/how-to-customize-default-approval.html' title='How to Customize Default Approval Workflow (Part.1)'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFCRmRsq-kU9cZL7oTnzkzb-TMAWPxpr7Jg2kx5kuX_TstuBUUccmzBWbFC6o8MTypEm7G_qz-XU1ieelz_MNlinCtZTApvu6xxE-a3gQwkTaD6S6ZqfZtIWX72P3d1j7XhFZwKSyDqWM/s72-c/13.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-1479641988276638320</id><published>2011-05-05T01:53:00.005+09:00</published><updated>2011-05-08T23:56:40.232+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint Designer"/><category scheme="http://www.blogger.com/atom/ns#" term="UI"/><category scheme="http://www.blogger.com/atom/ns#" term="XSLT"/><title type='text'>Setting Default Value in List&#39;s NewForm.aspx Using Javascript</title><content type='html'>I introduced how to get column data on each list items row in a Xslt List View WebPart in the &lt;a href=&quot;http://sharepointdevelopertopics.blogspot.com/2011/04/how-to-get-column-data-on-each-list.html&quot;&gt;previous blog post&lt;/a&gt;.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1I0z6UAIUfxI4V6hB6A6roqLlrhczfRpurVRVb0JuxlwcX3ALbaRc13Qb-U8pqQe6pdxLOk_AY37Qtum6AQJfPw21IUAHHCs6rNLSxSYHFlbFmSVHgQ6PHtQzlRAV2zgkuZUeRe8bsDo/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1I0z6UAIUfxI4V6hB6A6roqLlrhczfRpurVRVb0JuxlwcX3ALbaRc13Qb-U8pqQe6pdxLOk_AY37Qtum6AQJfPw21IUAHHCs6rNLSxSYHFlbFmSVHgQ6PHtQzlRAV2zgkuZUeRe8bsDo/s1600/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Today, I&#39;d like to introduce how to create &quot;links&quot; by using column data and enable to copy the column data to textboxes. When the link is clicked and opened, another&amp;nbsp;list&#39;s NewForm.aspx page will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The scenario is like this :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;If you click the link on each list items&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisSWFSqRcLMVC0kg6AMhkPHZPT94kBIeXDpeOplnKCKNIXnvsLgi3_jjN9GEzjh-3ZkuOrg9JL6-ASfcMGzsPrn0n-ogoUEkSiakqw5U8Cfjcy33G_jKxF42rt_zm2wxHDWodIIlfvcY0/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;124&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisSWFSqRcLMVC0kg6AMhkPHZPT94kBIeXDpeOplnKCKNIXnvsLgi3_jjN9GEzjh-3ZkuOrg9JL6-ASfcMGzsPrn0n-ogoUEkSiakqw5U8Cfjcy33G_jKxF42rt_zm2wxHDWodIIlfvcY0/s640/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&quot;Title&quot; value and &quot;Categories&quot; value of each list items are copied in another list&#39;s NewForm.aspx textboxes.&amp;nbsp; &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-DaTM31b5yGek4tNl2kYHhjgTFJo955eIXYr1u2IYQR6ceGMODFBRJV1f06DK3DcF8ORLeVfkreLgBiwJURiRhtgRNQF9cBcbiKQ5zTsLFB_uHkbwV9z9JqDiKQCX2ExQ_Ad9k6zVkLY/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;372&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-DaTM31b5yGek4tNl2kYHhjgTFJo955eIXYr1u2IYQR6ceGMODFBRJV1f06DK3DcF8ORLeVfkreLgBiwJURiRhtgRNQF9cBcbiKQ5zTsLFB_uHkbwV9z9JqDiKQCX2ExQ_Ad9k6zVkLY/s640/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In inside I &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;created &quot;&lt;i&gt;Notice the Announce&lt;/i&gt;&quot; link with &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;URL&#39;s parameters&lt;/span&gt;&lt;/b&gt; which has&amp;nbsp;&quot;Title&quot; value and &quot;Categories&quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;u&gt;http://sp2010/Lists/Notice/NewForm.aspx?title=Let&#39;s go to drink with us !!&amp;amp;category=invitation&lt;/u&gt;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
And I &lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;b&gt;copied&amp;nbsp;URL&#39;s parameters to textboxes on NewForm.aspx &lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;using Javascript&lt;/span&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, I&#39;ll show you steps ! Please check its !&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Open AllItems.aspx and enable &quot;Advanced Mode&quot; and display xslt view. (see&amp;nbsp;&lt;a href=&quot;http://sharepointdevelopertopics.blogspot.com/2011/04/how-to-get-column-data-on-each-list.html&quot;&gt;previous post.&lt;/a&gt;)&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Drag &amp;amp; Drop the ASP.NET HyperLink in a column.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDQ5KuxYI832mz8ArrFhQErvAvj6v77WCIRglVBsyBiZ2ZFuJkw3ZR9lhwXnfYfqeUxS1w3v1MMPUwf32Zt3j25fUu18V7BJJClZI4rEnhMgRHPnLmq0JY54Vl_7EgLNFJ5qs-g8VjW2k/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDQ5KuxYI832mz8ArrFhQErvAvj6v77WCIRglVBsyBiZ2ZFuJkw3ZR9lhwXnfYfqeUxS1w3v1MMPUwf32Zt3j25fUu18V7BJJClZI4rEnhMgRHPnLmq0JY54Vl_7EgLNFJ5qs-g8VjW2k/s1600/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;You can check if the code is added in code view and design view.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl1irvL7zIr-VPqO6cbPP_SywpBo40MX48XA55Z4il-CQIuwNTkmxWthPgRSdFNYSTVYyXfz1QZtQZjtgUjL7g1XAVZ8F-aQKTi0vgj8GAu-jXzVz8Ke2hHSUYfsU-SoByD6dpjuLAKNE/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl1irvL7zIr-VPqO6cbPP_SywpBo40MX48XA55Z4il-CQIuwNTkmxWthPgRSdFNYSTVYyXfz1QZtQZjtgUjL7g1XAVZ8F-aQKTi0vgj8GAu-jXzVz8Ke2hHSUYfsU-SoByD6dpjuLAKNE/s1600/3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3EygYH66vOAbNIPGwWWlQeILlXfqDgFdBuWb4V50sMEOz0KLxuvXMhDNFqOwNwSnEQQBSkCplI2ocnNg6zKTa6HosOrL3Wc-_st6Ls6jhodPhoNuR9Hf-tI-72VHtGDQK_trwEDShpWE/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3EygYH66vOAbNIPGwWWlQeILlXfqDgFdBuWb4V50sMEOz0KLxuvXMhDNFqOwNwSnEQQBSkCplI2ocnNg6zKTa6HosOrL3Wc-_st6Ls6jhodPhoNuR9Hf-tI-72VHtGDQK_trwEDShpWE/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create a link in asp:HyperLink tag using NavigateURL property and change link name from &quot;&lt;i&gt;HyperLink&lt;/i&gt;&quot; to &quot;&lt;i&gt;Notice the Announce&lt;/i&gt;&quot;. &amp;nbsp;(also see &lt;a href=&quot;http://sharepointdevelopertopics.blogspot.com/2011/04/how-to-get-column-data-on-each-list.html&quot;&gt;previous post.&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;&lt;asp:hyperlink id=&quot;HyperLink1{$ID}{generate-id()}&quot; runat=&quot;server&quot;&gt;
 &lt;xsl:attribute name=&quot;NavigateURL&quot;&gt;http://sp2010/Lists/Notice/NewForm.aspx?title=&lt;xsl:value-of select=&quot;$thisNode/@Title&quot;&gt;&amp;amp;category=&lt;xsl:value-of select=&quot;$thisNode/@Categories&quot;&gt;&lt;/xsl:value-of&gt;&lt;/xsl:value-of&gt;&lt;/xsl:attribute&gt;
Notice the Announce
&lt;/asp:hyperlink&gt;
&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW1SoyuJ4XcZP_aaWs_QqUgq7zCXoaettro5XNue7OiUxK0qXyMHogwwGZjHxiK5tUhToKSloNTJYoqxJKUgHBc4QIPB5IEgAciG0ANWg3dLI-jf4k7heXPn7Sgtlt5WnwbaNejEIaDG8/s1600/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;194&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW1SoyuJ4XcZP_aaWs_QqUgq7zCXoaettro5XNue7OiUxK0qXyMHogwwGZjHxiK5tUhToKSloNTJYoqxJKUgHBc4QIPB5IEgAciG0ANWg3dLI-jf4k7heXPn7Sgtlt5WnwbaNejEIaDG8/s640/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Open another list&#39;s NewForm.aspx of the link target and&amp;nbsp;enable &quot;Advanced Mode&quot;.&lt;/li&gt;
&lt;li&gt;Add Javascript code under the asp:content tag.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;&lt;asp:content contentplaceholderid=&quot;PlaceHolderLeftNavBar&quot; runat=&quot;server&quot;&gt;

&lt;script type=&quot;text/javascript&quot;&gt;
　var a = new Array();
　if (location.search.length &gt; 1) {
　　var list = location.search.substr(1).split(&quot;&amp;&quot;); 
　　for (i in list) {
　　　a.push(list[i].split(&quot;=&quot;));
　　}
　}
function copyColumnData()
{
 document.aspnetForm.ctl00_m_g_f3ae55fa_9a6e_4277_b7b3_e011e50d2977_ctl00_ctl05_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField.value=a[0][1];
 document.aspnetForm.ctl00_m_g_f3ae55fa_9a6e_4277_b7b3_e011e50d2977_ctl00_ctl05_ctl03_ctl00_ctl00_ctl04_ctl00_ctl00_TextField.value=a[1][1];
}
window.attachEvent(&quot;onload&quot;, copyColumnData);
&lt;/script&gt;

////////

&lt;/asp:content&gt;&lt;/pre&gt;&lt;br /&gt;
The Javascript code details :&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;First&lt;/span&gt;&lt;/b&gt;, I added column data from URL&#39;s parameters to Array class instance.&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Second&lt;/span&gt;&lt;/b&gt;, I made &quot;copyColumnData&quot; function and added column data from Array class instance to textboxes. &quot;&lt;i&gt;aspnetForm&lt;/i&gt;&quot; means the name property in Form tag in html. &quot;&lt;i&gt;ctl00_m_g_f3ae55fa_9a6e_4277_b7b3_e011e50d2977_ctl00_ctl05_ctl03_ctl00_ctl00_ctl04_ctl00_ctl00_TextField&lt;/i&gt;&quot; means the id property in its textbox&#39;s input tag in html. You can check it in NewForm.aspx html source.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;&lt;span dir=&quot;none&quot;&gt;
&lt;input class=&quot;ms-long ms-spellcheck-true&quot; id=&quot;ctl00_m_g_f3ae55fa_9a6e_4277_b7b3_e011e50d2977_ctl00_ctl05_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField&quot; maxlength=&quot;255&quot; name=&quot;ctl00$m$g_f3ae55fa_9a6e_4277_b7b3_e011e50d2977$ctl00$ctl05$ctl00$ctl00$ctl00$ctl04$ctl00$ctl00$TextField&quot; title=&quot;Title&quot; type=&quot;text&quot; /&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Third&lt;/span&gt;&lt;/b&gt;, I added&amp;nbsp;&quot;copyColumnData&quot; function as a listener&amp;nbsp;in window.attachEvent method. &quot;onload&quot; means &amp;nbsp;window.attachEvent method is called after page load is finished.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Steps are done ! Save aspx pages and check the motion !&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I see bellow blog post by reference. It&#39;s very understandable.&lt;br /&gt;
&lt;a href=&quot;http://www.tautic.com/?p=28&quot;&gt;Passing default values to a SharePoint list&#39;s NewForm.aspx page.&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;I usually go to cafe on a weekend. I can concentrate a few hours.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih1q4uOUls9o5pipe-hamcttKVGe4Qotg7lDmsZAJwkKA13P-kij36wo9jS36ghWP8rPkZHK2J91Pxh_n0mozGzMA121EhWfzs-xP9W2eHJqMqSl6mx9PAAcW2nmTVxwDROysUbU5Jzbk/s1600/4403081108_031b7c5899_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEih1q4uOUls9o5pipe-hamcttKVGe4Qotg7lDmsZAJwkKA13P-kij36wo9jS36ghWP8rPkZHK2J91Pxh_n0mozGzMA121EhWfzs-xP9W2eHJqMqSl6mx9PAAcW2nmTVxwDROysUbU5Jzbk/s640/4403081108_031b7c5899_o.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/1479641988276638320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/05/setting-default-value-in-lists.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/1479641988276638320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/1479641988276638320'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/05/setting-default-value-in-lists.html' title='Setting Default Value in List&#39;s NewForm.aspx Using Javascript'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1I0z6UAIUfxI4V6hB6A6roqLlrhczfRpurVRVb0JuxlwcX3ALbaRc13Qb-U8pqQe6pdxLOk_AY37Qtum6AQJfPw21IUAHHCs6rNLSxSYHFlbFmSVHgQ6PHtQzlRAV2zgkuZUeRe8bsDo/s72-c/1.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-1535652888433052912</id><published>2011-04-30T19:34:00.002+09:00</published><updated>2011-05-01T17:35:02.531+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SharePoint Designer"/><category scheme="http://www.blogger.com/atom/ns#" term="XSLT"/><title type='text'>How To Get Column Data On Each List Items row in a Xslt List View WebPart</title><content type='html'>In SharePoint 2007, We can get all column data bellow xslt code.&lt;br /&gt;
This sample is getting &quot;Title&quot; column value in &quot;Modified&quot; column.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;&lt;xsl:value-of select=&quot;@Title&quot;&gt;&lt;/xsl:value-of&gt;&lt;/pre&gt;&lt;br /&gt;
Also we can get same result bellow code.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;&lt;xsl:value-of select=&quot;/dsQueryResponse/Rows/Row/@Title&quot;&gt;&lt;/xsl:value-of&gt;&lt;/pre&gt;&lt;br /&gt;
The Bellow image is result.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh5OVfk75khzaVOQPXgmht4mhU4WkvxKMrfVcHEwbRN1IN7pffzHJ7Et3nRE8F8saQjyBAPNe4RJ88X4uVMROFG5SCl81ubInyF9aWoosABQeswaWFXjaN6f9lpABHV3Uv2n9Lc-vzf4s/s1600/8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh5OVfk75khzaVOQPXgmht4mhU4WkvxKMrfVcHEwbRN1IN7pffzHJ7Et3nRE8F8saQjyBAPNe4RJ88X4uVMROFG5SCl81ubInyF9aWoosABQeswaWFXjaN6f9lpABHV3Uv2n9Lc-vzf4s/s1600/8.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;In SharePoint 2010, we cannot use the above code. We should use bellow code.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;&lt;xsl:value-of select=&quot;$thisNode/@Title&quot;&gt;&lt;/xsl:value-of&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
The Bellow image is result.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1I0z6UAIUfxI4V6hB6A6roqLlrhczfRpurVRVb0JuxlwcX3ALbaRc13Qb-U8pqQe6pdxLOk_AY37Qtum6AQJfPw21IUAHHCs6rNLSxSYHFlbFmSVHgQ6PHtQzlRAV2zgkuZUeRe8bsDo/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1I0z6UAIUfxI4V6hB6A6roqLlrhczfRpurVRVb0JuxlwcX3ALbaRc13Qb-U8pqQe6pdxLOk_AY37Qtum6AQJfPw21IUAHHCs6rNLSxSYHFlbFmSVHgQ6PHtQzlRAV2zgkuZUeRe8bsDo/s1600/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Then, I introduce how to add this code easily in SharePoint Designer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Open AllItems.aspx or other new view page in SharePoint Designer.&lt;/li&gt;
&lt;li&gt;Click &quot;Advanced Mode&quot; in Home tab to enable to edit entire page.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwIFTWq_3Op3rskjNlwsR50fhd29l0HGjOHUDAXXmrd-gqt_L-0MhiCszYUctw5C6X3I7_lNyQVjXoBMuzFtysCE_SvvS_R2P0qzYreoeDpp6ihkP7bIcdpz7gRgnyCjnYrgU2612til0/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwIFTWq_3Op3rskjNlwsR50fhd29l0HGjOHUDAXXmrd-gqt_L-0MhiCszYUctw5C6X3I7_lNyQVjXoBMuzFtysCE_SvvS_R2P0qzYreoeDpp6ihkP7bIcdpz7gRgnyCjnYrgU2612til0/s1600/2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Click List View Web Part in Design View.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmDj8M6WrLnnGtE2v7pRzsFE_v0qZtinTp6P7T_mbknHiZYkoTzq9mwz1TAJXzfYZMb60JQeBhvfp14UdNbefCldeTJ9V6JtXo1Kdg6vIHhPQFv8_SOcBUrZcSR1yToI0jlUPHJrwGCe8/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmDj8M6WrLnnGtE2v7pRzsFE_v0qZtinTp6P7T_mbknHiZYkoTzq9mwz1TAJXzfYZMb60JQeBhvfp14UdNbefCldeTJ9V6JtXo1Kdg6vIHhPQFv8_SOcBUrZcSR1yToI0jlUPHJrwGCe8/s1600/4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Click &quot;Customize XSLT&quot; - &quot;Customize Entire View&quot; in Design Tab.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt-vpfBFJ4L1cEvV7hR__gX-UrrkhTRkqA3Cma93C5cde-TYIAI1KXkXl44W0FLGFkoVva0w00za5Czd5MGazj2uTKVfC1G-zTicBU2eQL5DI710trGn80Fj1_fZ0qpN3n03X2oQggmIA/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjt-vpfBFJ4L1cEvV7hR__gX-UrrkhTRkqA3Cma93C5cde-TYIAI1KXkXl44W0FLGFkoVva0w00za5Czd5MGazj2uTKVfC1G-zTicBU2eQL5DI710trGn80Fj1_fZ0qpN3n03X2oQggmIA/s1600/5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Drag &amp;amp; Drop &quot;Title&quot; from Data Source Detail to Xslt List View Web Part.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhEEblFUHbYZdunHHZKmK5725cOV1FoBLF970RGeeYogdp_udAkhdmNfZqIqNx6n9CjssGK3G69C-Tx4o4-Y5gPOCNyRkwYqzf_zVomjudZGog6DcYCAEh11c6UVZ5nDtjEdF0Y5WjOgo/s1600/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;275&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhEEblFUHbYZdunHHZKmK5725cOV1FoBLF970RGeeYogdp_udAkhdmNfZqIqNx6n9CjssGK3G69C-Tx4o4-Y5gPOCNyRkwYqzf_zVomjudZGog6DcYCAEh11c6UVZ5nDtjEdF0Y5WjOgo/s640/6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;You can check the code in Code View.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibJ8vzBwfQ7cc3EnW62JfInLwMTsjwWbdILPnmaI5As5IUbnlGAq_EDWa-iU9mgBame-NRE4DuSGAGpybMp5qSKpeiSpMetUHSAllRvxyxpeKFbNjqc-ez2TfO0VFHkCC_UweExzjmM8Y/s1600/7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibJ8vzBwfQ7cc3EnW62JfInLwMTsjwWbdILPnmaI5As5IUbnlGAq_EDWa-iU9mgBame-NRE4DuSGAGpybMp5qSKpeiSpMetUHSAllRvxyxpeKFbNjqc-ez2TfO0VFHkCC_UweExzjmM8Y/s1600/7.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;i&gt;After cherry blossoms, we can see a lot of&amp;nbsp;field mustard !&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUdyEm72BLYucD8c7HVHkYuJpOJLwlZ97eREqPl3SDqzfbQ5jQkx24iw2ZtaYvhgJ1ZCMZWXFc9ufjZ2qMoJlDa3TPYkKfngs4welcTJddUcMt2j73aQ9FDBmjNbzjvivhjAwrnxoipwI/s1600/408650855_55e6d47cc9_o.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;425&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUdyEm72BLYucD8c7HVHkYuJpOJLwlZ97eREqPl3SDqzfbQ5jQkx24iw2ZtaYvhgJ1ZCMZWXFc9ufjZ2qMoJlDa3TPYkKfngs4welcTJddUcMt2j73aQ9FDBmjNbzjvivhjAwrnxoipwI/s640/408650855_55e6d47cc9_o.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/1535652888433052912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/how-to-get-column-data-on-each-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/1535652888433052912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/1535652888433052912'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/how-to-get-column-data-on-each-list.html' title='How To Get Column Data On Each List Items row in a Xslt List View WebPart'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh5OVfk75khzaVOQPXgmht4mhU4WkvxKMrfVcHEwbRN1IN7pffzHJ7Et3nRE8F8saQjyBAPNe4RJ88X4uVMROFG5SCl81ubInyF9aWoosABQeswaWFXjaN6f9lpABHV3Uv2n9Lc-vzf4s/s72-c/8.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-5509751486365520391</id><published>2011-04-19T00:18:00.001+09:00</published><updated>2011-04-19T23:29:09.508+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EventReceiver"/><title type='text'>ItemAdded Event Sometimes Cannot Get AfterProperties</title><content type='html'>-ed Event such as &quot;ItemAdded&quot; method sometimes cannot get &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventproperties.afterproperties.aspx&quot;&gt;AfterProperties&lt;/a&gt;&amp;nbsp;which is added by Document Parser from a list item. I heard this from one of my colleagues and I haven&#39;t reproduced it yet.&lt;br /&gt;
Document Parser enables to binding the document properties to list item&#39;s columns. Here is the sample :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Click New Document.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixgN0bn_nJj49E0GJU6SqcKrS1IyRyYSZYzCnOV9UNvuhkW5E8g-dGc9RYZKH0C-rd3HQZP6fDAe_oXQqXHitAm6Rfq9Vyr5iBopvUTy9Tz7-UjPTOHYJXMIu5rAhrRBBYACuQIj8apqs/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixgN0bn_nJj49E0GJU6SqcKrS1IyRyYSZYzCnOV9UNvuhkW5E8g-dGc9RYZKH0C-rd3HQZP6fDAe_oXQqXHitAm6Rfq9Vyr5iBopvUTy9Tz7-UjPTOHYJXMIu5rAhrRBBYACuQIj8apqs/s1600/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;ul&gt;&lt;li&gt;Fill in the form and click Save.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZjXjHgnC4TNF7VyQQaTskB5eaNAWlVAxIqiYAXiPMRnHVGaQdp_aaX5KvOTuxUus-KqmeF_K191EHqL8jv14RVc15UZM5RUpWVU_OzfDR1310FRYthHOTXDrFT3M0F0QeukNkTvqSZqI/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZjXjHgnC4TNF7VyQQaTskB5eaNAWlVAxIqiYAXiPMRnHVGaQdp_aaX5KvOTuxUus-KqmeF_K191EHqL8jv14RVc15UZM5RUpWVU_OzfDR1310FRYthHOTXDrFT3M0F0QeukNkTvqSZqI/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;You can see the form data were binded to list item&#39;s columns.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhARlKswcU5lNG-QvKUTEAS6gDPRXCj_KHKtbwHA9mzWWZR0h-iK-01gavYhl_kPDL8ooPPyH8YUw3sMJyB2Ge7FPD9jerv8tFxnq5GMz94lKuQ-dwt0OATgw1LZJa5TN-XTT5mg3ihYis/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;210&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhARlKswcU5lNG-QvKUTEAS6gDPRXCj_KHKtbwHA9mzWWZR0h-iK-01gavYhl_kPDL8ooPPyH8YUw3sMJyB2Ge7FPD9jerv8tFxnq5GMz94lKuQ-dwt0OATgw1LZJa5TN-XTT5mg3ihYis/s640/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;We usually write event handler code which gets list item&#39;s column data when an item is added. But sometimes we cannot get&amp;nbsp;item&#39;s column data by using&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventproperties.afterproperties.aspx&quot;&gt;AfterProperties&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;This is because -ed event (ItemAdded) runs asynchronously. That means&amp;nbsp;-ed event and document parser which add data to column run different threads. In this case, &lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;w&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;hat we need to do is adding &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.threading.thread.sleep.aspx&quot;&gt;Thread.Sleep&lt;/a&gt; in -ed event code.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;Thread.Sleep is specified in milliseconds unit.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp;Here is the sample :&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;public override void ItemAdded(SPItemEventProperties properties)
{
    Thread.Sleep(100);
    string name = (string)properties.AfterProperties[&quot;Name&quot;];
    string title = (string)properties.AfterProperties[&quot;Title0&quot;];
    string discription = (string)properties.AfterProperties[&quot;Discription&quot;];
    SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory(&quot;ItemAdded&quot;, TraceSeverity.Unexpected, EventSeverity.Error), TraceSeverity.Unexpected, &quot;ItemAdded&quot; + &quot; &quot; + name + &quot; &quot; + title + &quot; &quot; + discription, &quot;ItemAdded&quot; + &quot; &quot; + name + &quot; &quot; + title + &quot; &quot; + discription);
}
&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;I love Terje Sorgjerd&#39;s creations. They are my favorites. So beautiful, so creative. I&#39;ll share his another creation.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; height=&quot;380&quot; src=&quot;http://player.vimeo.com/video/21294655&quot; width=&quot;650&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/5509751486365520391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/itemadded-event-sometimes-cannot-get.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/5509751486365520391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/5509751486365520391'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/itemadded-event-sometimes-cannot-get.html' title='ItemAdded Event Sometimes Cannot Get AfterProperties'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixgN0bn_nJj49E0GJU6SqcKrS1IyRyYSZYzCnOV9UNvuhkW5E8g-dGc9RYZKH0C-rd3HQZP6fDAe_oXQqXHitAm6Rfq9Vyr5iBopvUTy9Tz7-UjPTOHYJXMIu5rAhrRBBYACuQIj8apqs/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-6419772555850419457</id><published>2011-04-16T23:50:00.005+09:00</published><updated>2011-05-05T01:57:54.107+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Client OM"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="UI"/><title type='text'>Using the SharePoint 2010 Modal Dialog in Custom Aspx Page</title><content type='html'>SharePoint 2010 provides a new dialog framework using Client OM (javascript).&lt;br /&gt;
You can see the following dialog when you click an item from the list.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtvCNyKKFMdYiuV0qpdgmk6nNSZzkKtL3kqroEGGwT-qNpRl2O17CFOBgHIFjEqjcnvYUNPDki7sygFKLtAgTkOUeeKLs7VXSUD3TmV9blIrL0ILj1gGerwShuk2qVV8rXlLS9Iiotidc/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;396&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtvCNyKKFMdYiuV0qpdgmk6nNSZzkKtL3kqroEGGwT-qNpRl2O17CFOBgHIFjEqjcnvYUNPDki7sygFKLtAgTkOUeeKLs7VXSUD3TmV9blIrL0ILj1gGerwShuk2qVV8rXlLS9Iiotidc/s640/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Modal dialog is provided by&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ff408909.aspx&quot;&gt;SP.UI.ModalDialog&lt;/a&gt;&amp;nbsp;class.&lt;br /&gt;
Today, I&#39;d like to introduce how to create a link to show modal dialog in a custom aspx page.&lt;br /&gt;
The steps are here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Create Empty SharePoint Project.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5mw_qdwWZDR0Hkf1Fn1WDsJD50zFsx6TZ_wM3TCjG-c9k5fw58JxcTQCsaCPmJEw2Qe0MNtGcjf4qVKdxaorSRDb5G03GpCy-ICPXVgHy1HsWo3IUSAyQ1gsNU3f0mKLJerg0nbxSGII/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;428&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5mw_qdwWZDR0Hkf1Fn1WDsJD50zFsx6TZ_wM3TCjG-c9k5fw58JxcTQCsaCPmJEw2Qe0MNtGcjf4qVKdxaorSRDb5G03GpCy-ICPXVgHy1HsWo3IUSAyQ1gsNU3f0mKLJerg0nbxSGII/s640/2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Add new Application page in the new project.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaEsK6m5df64sQhMzlk6hIkL_AjmXOwUTuSrUBx9NEXxs_kmeBiQh3raPqislzVWxAGXObR9HKuQZ8O8FwzUapHdhOsWut_7Bqp6_ZTwkED-PwKhhahVsrnmz5F4LkPPd60jC-_FGNwoM/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;434&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaEsK6m5df64sQhMzlk6hIkL_AjmXOwUTuSrUBx9NEXxs_kmeBiQh3raPqislzVWxAGXObR9HKuQZ8O8FwzUapHdhOsWut_7Bqp6_ZTwkED-PwKhhahVsrnmz5F4LkPPd60jC-_FGNwoM/s640/3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Open&amp;nbsp;new Application page, and add HyperLink tag in &quot;PlaceHolderMain&quot;.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;&lt;asp:content contentplaceholderid=&quot;PlaceHolderMain&quot; id=&quot;Main&quot; runat=&quot;server&quot;&gt;
    &lt;asp:hyperlink id=&quot;HyperLink1&quot; runat=&quot;server&quot;&gt;HyperLink&lt;/asp:hyperlink&gt;
&lt;/asp:content&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Open code view of new&amp;nbsp;Application page, and Write the code bellow.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;This code indicates :&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Get workflow task item&#39;s URL.&lt;/li&gt;
&lt;li&gt;Register modal dialog&#39;s script by using&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.aspx&quot;&gt;ScriptManager class&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Bind javascript method for task url link.&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;StringBuilder taskUrl = new StringBuilder();

        protected void Page_Load(object sender, EventArgs e)
        {
            SPWeb web = SPContext.Current.Web;
            SPList list = web.Lists[&quot;Announcements&quot;];

            foreach (SPListItem item in list.Items)
            {
                if (item.Workflows != null)
                {
                    foreach (SPWorkflow workflow in item.Workflows)
                    {
                        if (workflow.Tasks != null)
                        {
                            foreach (SPListItem task in workflow.Tasks)
                            {
                                //create task item url.
                                taskUrl.Append(&quot;http://sharepoint/_layouts/WrkTaskIP.aspx?List=&quot;);
                                taskUrl.Append(workflow.TaskListId);
                                taskUrl.Append(&quot;&amp;amp;ID=&quot; + task.ID + &quot;&amp;amp;IsDlg=1&amp;amp;Web=&quot;);
                                taskUrl.Append(web.ID);
                            }
                        }
                    }
                }
            }
            
            //make modal dialog script.
            string script =
                @&quot;
    var modalDialog;
    function ShowDialogTest() {
        var options = {
            url: &#39;&quot; + taskUrl.ToString() + @&quot;&#39;,
            tite: &#39;Workflow Task&#39;,
            allowMaximize: false,
            showClose: false,
            width: 800,
            height: 600 };
        modalDialog = SP.UI.ModalDialog.showModalDialog(options);
    }&quot;;
            //register the script.
            ScriptManager.RegisterStartupScript(this, this.GetType(), ClientID, script, true);
            //bind the script for hyperlink.
            HyperLink1.NavigateUrl = &quot;javascript:ShowDialogTest()&quot;;
        }
&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;The code is very simple. If there are more than two task items, the code doesn&#39;t work.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Deploy and access the new application page.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgumQ6ujqREPn3DyUxe1BmmYmZ3rqpOeqh47MQQbZtaJpHS7RqGAtV5FFCbEfchcc5EfoHII7yTdSXfL0TBsIZzI-JH7bKMHfxLbsDPXlZ8ztNV7hxIc1M93uQCzJoTo6dui7fVqZnLb20/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgumQ6ujqREPn3DyUxe1BmmYmZ3rqpOeqh47MQQbZtaJpHS7RqGAtV5FFCbEfchcc5EfoHII7yTdSXfL0TBsIZzI-JH7bKMHfxLbsDPXlZ8ztNV7hxIc1M93uQCzJoTo6dui7fVqZnLb20/s640/4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;If you create Application page in SharePoint Empty Project, the aspx page is deployed in &quot;_layouts&quot; and master page tag is attached automatically. This is very nice function !!&amp;nbsp;&lt;/div&gt;&lt;div&gt;Sample url is here. &quot;ShowModalDialog&quot; is the project name.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;http://sharepoint/_layouts/ShowModalDialog/ApplicationPage1.aspx&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Click &quot;HyperLink&quot; link. Modal Dialog is displayed !!&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv89jKvmHhSDtAgIFeItY8ncEiIyJIjC7pDbHaTwmYVkJsgT0R_phz9SZ14VQLfoRj3sDypTPHohkYuceK3Arq5aO6ijyS-gymgtASNomYbcwLgQqLlxpsgGh8GpnuaOtNAhIJCtGuNtA/s1600/5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhv89jKvmHhSDtAgIFeItY8ncEiIyJIjC7pDbHaTwmYVkJsgT0R_phz9SZ14VQLfoRj3sDypTPHohkYuceK3Arq5aO6ijyS-gymgtASNomYbcwLgQqLlxpsgGh8GpnuaOtNAhIJCtGuNtA/s640/5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Tips :&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I also created an application page in ASP.NET Web Application project. But the code didn&#39;t work even after I added the script reference.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;&lt;script src=&quot;http://sharepoint/_layouts/sp.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;script src=&quot;http://sharepoint/_layouts/SP.UI.Dialog.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
I got &quot;&#39;Type&#39; is undefined (sp.js)&quot; error when I clicked hyperlink to display modal dialog. I can&#39;t understand why the error appears.&lt;br /&gt;
I&#39;m trying to find out why it happens.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfa_D1ibM3PLMROH2ZhKohgPzF5NIvg3mASQKGVySBwVsKB2C-vGhi34NAtSYJ1YUVUgYSqDrYb8dJsa8QLD0RulnuijM5H9SK1c2c4ociPsVoR0aATXxfL86ybtvGZMhJgJ0DdXkMPW4/s1600/6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;262&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfa_D1ibM3PLMROH2ZhKohgPzF5NIvg3mASQKGVySBwVsKB2C-vGhi34NAtSYJ1YUVUgYSqDrYb8dJsa8QLD0RulnuijM5H9SK1c2c4ociPsVoR0aATXxfL86ybtvGZMhJgJ0DdXkMPW4/s400/6.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;I found tremendously beautiful movie in Vimeo !!&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;The movie was recorded on a mountain in Spain.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; height=&quot;380&quot; src=&quot;http://player.vimeo.com/video/22439234&quot; width=&quot;650&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/6419772555850419457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/using-sharepoint-2010-modal-dialog-in.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/6419772555850419457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/6419772555850419457'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/using-sharepoint-2010-modal-dialog-in.html' title='Using the SharePoint 2010 Modal Dialog in Custom Aspx Page'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtvCNyKKFMdYiuV0qpdgmk6nNSZzkKtL3kqroEGGwT-qNpRl2O17CFOBgHIFjEqjcnvYUNPDki7sygFKLtAgTkOUeeKLs7VXSUD3TmV9blIrL0ILj1gGerwShuk2qVV8rXlLS9Iiotidc/s72-c/1.png" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-1341067258304961328</id><published>2011-04-10T00:17:00.008+09:00</published><updated>2011-04-28T23:33:54.287+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EventReceiver"/><title type='text'>How to disabling event firing in SharePoint 2010</title><content type='html'>Today, I tested whether event receiver fires or not when I use SPListItem&#39;s Update methods.&lt;br /&gt;
The results are here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
M&lt;b&gt;ethods &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; event firing&lt;/b&gt;&lt;br /&gt;
Update() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fired&lt;br /&gt;
SystemUpdate() &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fired&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;SystemUpdate(false) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;fired&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;UpdateOverwriteVersion() &amp;nbsp; fired&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;All methods fired !!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;But I think people sometimes want not to fire a event receiver when a update method is used.&lt;/div&gt;&lt;div&gt;So, I would like to introduce how to disable event firing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;In SharePoint 2010,&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;SPEventReceiverBase.DisableEventFiring Method and&amp;nbsp;SPEventReceiverBase.EnableEventFiring Method are already obsolete. We need to use&amp;nbsp;EventFiringEnabled Property.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceiverbase.disableeventfiring.aspx&quot;&gt;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceiverbase.disableeventfiring.aspx&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;A sample code is here.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;private void button1_Click(object sender, EventArgs e)
{
    const string siteUrl = &quot;http://sp2010&quot;;
    SPSite site = new SPSite(siteUrl);
    SPWeb web = site.RootWeb;

    SPList list = web.Lists[&quot;Announcements&quot;];
    SPListItem item = list.Items[3];

    HandleEventFiring handleEventFiring = new HandleEventFiring();
    handleEventFiring.DisableHandleEventFiring();

    try
    {
        item.Update();
    }
    finally
    {
        handleEventFiring.EnableHandleEventFiring();
    }
}

public class HandleEventFiring : SPItemEventReceiver
{

    public void DisableHandleEventFiring()
    {
        //obsolete
        //this.DisableEventFiring();
        this.EventFiringEnabled = false;
    }

    public void EnableHandleEventFiring()
    {
        //obsotete
        //this.EnableEventFiring();
        this.EventFiringEnabled = true;
    }
}
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;This summer, I plan to go forest hiking.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW0iS6BDdhJUOr29FF9JPhsf3q8gz9mb5Dc-Kr7w0W9LBa3Nxdm41zR-SkWHpFsEeGHYRFZ5R6trPQThrn0TXph4dZoD1EUnIlsDBaZCRtYrrulc6KbZIg_gwTg4UonIrrSx-7X6tMkJI/s1600/2786112305_a22c6df632_b.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW0iS6BDdhJUOr29FF9JPhsf3q8gz9mb5Dc-Kr7w0W9LBa3Nxdm41zR-SkWHpFsEeGHYRFZ5R6trPQThrn0TXph4dZoD1EUnIlsDBaZCRtYrrulc6KbZIg_gwTg4UonIrrSx-7X6tMkJI/s640/2786112305_a22c6df632_b.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/1341067258304961328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/changes-disabling-event-firing-in.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/1341067258304961328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/1341067258304961328'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/changes-disabling-event-firing-in.html' title='How to disabling event firing in SharePoint 2010'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW0iS6BDdhJUOr29FF9JPhsf3q8gz9mb5Dc-Kr7w0W9LBa3Nxdm41zR-SkWHpFsEeGHYRFZ5R6trPQThrn0TXph4dZoD1EUnIlsDBaZCRtYrrulc6KbZIg_gwTg4UonIrrSx-7X6tMkJI/s72-c/2786112305_a22c6df632_b.jpg" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-7099410579328128671</id><published>2011-04-09T18:39:00.006+09:00</published><updated>2011-04-09T19:29:16.265+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="workflow"/><title type='text'>troubleshooting in making workflow each steps (InvalidOperationException and ArgumentNullException)</title><content type='html'>This time, I introduce how to make simple workflow and its troubleshooting.&lt;br /&gt;
Someone who makes workflow encounter a few exceptions. I show each resolutions when workflow execution.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Make Sequential Workflow from SharePoint 2010 template.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdnnhbRbU8LWcdBAc_M2YRY8K-UICvKtS942t6PP_P_izMvn-twQ67Pn-DSJaX94IqiSY4WP8NFTZeNsg-VBkW5GD1TDs1UgHMIy0c2Yr51dVXEVmOJrlYIkFOuZxOqpHzbsP3FMVtPLw/s1600/11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;443&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdnnhbRbU8LWcdBAc_M2YRY8K-UICvKtS942t6PP_P_izMvn-twQ67Pn-DSJaX94IqiSY4WP8NFTZeNsg-VBkW5GD1TDs1UgHMIy0c2Yr51dVXEVmOJrlYIkFOuZxOqpHzbsP3FMVtPLw/s640/11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Make simple workflow. CreateTask, Delay, and CompleteTask.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlGAp3VwSaWWdyPKSxYl18yfXErM361WsiaQLENElqVZGnxFjrgQXJkDpo1ndvHZqOy9C-M9OIdxRkiDfLu9e528nbcBECTSUAdZ1jg_lPGltn8XgEPcThKMNuZ18vTTJdqp5SZp97dzw/s1600/12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlGAp3VwSaWWdyPKSxYl18yfXErM361WsiaQLENElqVZGnxFjrgQXJkDpo1ndvHZqOy9C-M9OIdxRkiDfLu9e528nbcBECTSUAdZ1jg_lPGltn8XgEPcThKMNuZ18vTTJdqp5SZp97dzw/s320/12.png&quot; width=&quot;228&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Set correlation Token&amp;nbsp;same as onWorkflowActivated1&amp;nbsp;for createTask1 and completeTask1 in each properties menu.&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;onWorkflowActivated1 :&amp;nbsp;workflowToken&lt;br /&gt;
createTask1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: workflowToken&lt;br /&gt;
completeTask1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :&amp;nbsp;workflowToken&lt;/blockquote&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Build, deploy and run in particular list.&amp;nbsp;Of course, It doesn&#39;t work.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNqSJUhHnWV9pPV_ZzN-HQgcWjkknaCiB8EUrdzK8Ra7OeqW8hJdT8PrMYyRnCage8c7RD_d5BHPUOLFEm3VD8RSLWLP9ouwJMQ-rASK9fXzIjhrPvFTOOcHWJZcg6THy6GUQtUyxA0-A/s1600/13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;40&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNqSJUhHnWV9pPV_ZzN-HQgcWjkknaCiB8EUrdzK8Ra7OeqW8hJdT8PrMYyRnCage8c7RD_d5BHPUOLFEm3VD8RSLWLP9ouwJMQ-rASK9fXzIjhrPvFTOOcHWJZcg6THy6GUQtUyxA0-A/s640/13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I checked ULSlog and found bellow&amp;nbsp;InvalidOperationException&amp;nbsp;about workflow.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;System.InvalidOperationException:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Correlation value on declaration &quot;workflowToken&quot; is already initialized. &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Workflow.Runtime.CorrelationToken.Initialize(Activity activity, ICollection`1 propertyValues) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Workflow.Activities.CorrelationService.InvalidateCorrelationToken(Activity activity, Type interfaceType, String methodName, Object[] messageArgs) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Workflow.Activities.CallExternalMethodActivity.Execute(ActivityExecutionContext executionContext) &amp;nbsp; &amp;nbsp; at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Workflow.Runtime.Scheduler.Run()&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;This error is little bit tricky.&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;What we need to do is using new correlation token for each set of&amp;nbsp;createTask and completeTask.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;blockquote&gt;onWorkflowActivated1 :&amp;nbsp;workflowToken&lt;br /&gt;
createTask1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: TaskToken1&lt;br /&gt;
completeTask1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :&amp;nbsp;TaskToken1&lt;/blockquote&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSDZcOP2qnO2EN4_aHRMd9Uh7rSpe7w1F2lHOmARi-5HfqyyhlSvHujddyJsY9SS7_JKgYkfmJwFYbyTujHKGscpmNS5vQ1WG7BTeqp0MAY-UdaNEvbmDvevOgm4_nymzH_ggDD6qx3wg/s1600/14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSDZcOP2qnO2EN4_aHRMd9Uh7rSpe7w1F2lHOmARi-5HfqyyhlSvHujddyJsY9SS7_JKgYkfmJwFYbyTujHKGscpmNS5vQ1WG7BTeqp0MAY-UdaNEvbmDvevOgm4_nymzH_ggDD6qx3wg/s320/14.png&quot; width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;We use orrelation token to identify each tasks. If you have two tasks in workflow, you can set here.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;onWorkflowActivated1 :&amp;nbsp;workflowToken&lt;br /&gt;
createTask1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: TaskToken1&lt;br /&gt;
completeTask1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :&amp;nbsp;TaskToken1&lt;br /&gt;
createTask2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: TaskToken2&lt;br /&gt;
completeTask2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :&amp;nbsp;TaskToken2&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Let&#39;s build, deploy and run again ! &amp;nbsp;But,, you still get&amp;nbsp;ArgumentNullException...&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;blockquote&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;System.Reflection.TargetInvocationException:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;Exception has been thrown by the target of an invocation. ---&amp;gt; System.ArgumentNullException: Value cannot be null. &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at Microsoft.SharePoint.Workflow.SPWorkflow.GetReservedItemId(SPList list, Guid taskId, Boolean createNew) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at Microsoft.SharePoint.Workflow.SPWorkflow.GetReservedItemId(SPList list, Guid taskId) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at Microsoft.SharePoint.Workflow.SPWinOETaskService.CreateTaskWithContentTypeInternal(Guid taskId, SPWorkflowTaskProperties properties, Boolean useDefaultContentType, SPContentTypeId ctid, HybridDictionary specialPermissions) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;at Microsoft.SharePoint.Workflow.SPWinOETaskService.CreateTask(Guid taskId, SPWorkflowTaskProperties properties, HybridDictionary specialPermissions) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;--- End of inner exception stack trace --- &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct&amp;amp; sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) &amp;nbsp; &amp;nbsp; at System.Workflow.Activities.CallExternalMethodActivity.Execute(ActivityExecutionContext executionContext) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(T activity, ActivityExecutionContext executionContext) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Workflow.ComponentModel.ActivityExecutor`1.Execute(Activity activity, ActivityExecutionContext executionContext) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Workflow.ComponentModel.ActivityExecutorOperation.Run(IWorkflowCoreRuntime workflowCoreRuntime) &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-small;&quot;&gt;at System.Workflow.Runtime.Scheduler.Run()&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;It seems that this error occurs when createTask execute.&lt;/div&gt;&lt;div&gt;In here,&amp;nbsp;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;What we need to do is setting new GUID for createTask.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Double-click &quot;TaskId&quot; in&amp;nbsp;createTask1 properties. and make new Field which bind&amp;nbsp;TaskId.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDSkAdwPm_ZZkTdMzFSASXWXdTKQKURcdQJPiiMuxQBPFMvKBsXsOwnr0_EMX263VrPFqPpVRWYoXl4DfbQ3Swk7ja-OYgGpXxfQHFJPhFhiyirgDnSA1HT8k6bAjHs6rDaYlTr_3oSNk/s1600/14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDSkAdwPm_ZZkTdMzFSASXWXdTKQKURcdQJPiiMuxQBPFMvKBsXsOwnr0_EMX263VrPFqPpVRWYoXl4DfbQ3Swk7ja-OYgGpXxfQHFJPhFhiyirgDnSA1HT8k6bAjHs6rDaYlTr_3oSNk/s400/14.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;You can find bellow code is generated.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;public Guid createTask1_TaskId1 = default(System.Guid);
&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Double-click &quot;TaskProperties&quot; in&amp;nbsp;createTask1 properties. and make new Field which bind&amp;nbsp;TaskProperties.&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1QerKEix-I6OCDfGb1k9jqOv3Mx9jBWgloGXEw-KWGz6GTkzt8dHYyAJBX-1v4SzY65veCRFv2Xp6qqjntdpneE-PVhtlqWDCMEOc7tf5axrwYMbt_nL1EHoDXd5tZxiejTAQW1_2Xmo/s1600/15.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;321&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1QerKEix-I6OCDfGb1k9jqOv3Mx9jBWgloGXEw-KWGz6GTkzt8dHYyAJBX-1v4SzY65veCRFv2Xp6qqjntdpneE-PVhtlqWDCMEOc7tf5axrwYMbt_nL1EHoDXd5tZxiejTAQW1_2Xmo/s400/15.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;You can find bellow code is generated.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;public SPWorkflowTaskProperties createTask1_TaskProperties1 = new Microsoft.SharePoint.Workflow.SPWorkflowTaskProperties();
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Double click onWorkflowActivated1 and write code in&amp;nbsp;onWorkflowActivated1_Invoked like this.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e)
{
&amp;nbsp;&amp;nbsp; &amp;nbsp;this.workflowId = workflowProperties.WorkflowId;
}
&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Double click createTask1 and write code in&amp;nbsp;createTask1_MethodInvoking like this.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;private void createTask1_MethodInvoking(object sender, EventArgs e)
{
&amp;nbsp;&amp;nbsp; &amp;nbsp;this.createTask1_TaskId1 = Guid.NewGuid();
&amp;nbsp;&amp;nbsp; &amp;nbsp;this.createTask1_TaskProperties1.Title = &quot;Please approve the document.&quot;;
&amp;nbsp;&amp;nbsp; &amp;nbsp;this.createTask1_TaskProperties1.AssignedTo = &quot;domain\\someone&quot;;
}
&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Let&#39;s build, deploy and run again !&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;done.... It&#39;s heavy work.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitNvm_pbRVxFDb0biHJ-HdFL4g9XUE_5vyqeXAWIypFPINv1FeQimj3dBZ2nbuGbLx4QndQOvnxR_0_8lgrrkyjKvShkI3eBnUrLEnG-NvqHRR6O3tgUdd_kQCXRyG4LyjktnlMNcCKhE/s1600/16.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;50&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitNvm_pbRVxFDb0biHJ-HdFL4g9XUE_5vyqeXAWIypFPINv1FeQimj3dBZ2nbuGbLx4QndQOvnxR_0_8lgrrkyjKvShkI3eBnUrLEnG-NvqHRR6O3tgUdd_kQCXRyG4LyjktnlMNcCKhE/s640/16.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;So, this time is spring. We can see a lot of cherry blossoms. enjoy now !!&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz-MmiG2TNxozTHdxDWPa4om3iFsd2t763kiPfPbu-jy73oaLlzGy_vTF2zLVXfUnTe_e2fodf5JqjyU2sKQK3H9U0s6wbWRkJDRrGXUG3YlLm_uKx3H74-_7b81uII7DGCUVX0O4vi1A/s1600/5584884547_dfd0222ea8_b.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;426&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz-MmiG2TNxozTHdxDWPa4om3iFsd2t763kiPfPbu-jy73oaLlzGy_vTF2zLVXfUnTe_e2fodf5JqjyU2sKQK3H9U0s6wbWRkJDRrGXUG3YlLm_uKx3H74-_7b81uII7DGCUVX0O4vi1A/s640/5584884547_dfd0222ea8_b.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/7099410579328128671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/troubleshooting-in-making-workflow-each.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/7099410579328128671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/7099410579328128671'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/troubleshooting-in-making-workflow-each.html' title='troubleshooting in making workflow each steps (InvalidOperationException and ArgumentNullException)'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdnnhbRbU8LWcdBAc_M2YRY8K-UICvKtS942t6PP_P_izMvn-twQ67Pn-DSJaX94IqiSY4WP8NFTZeNsg-VBkW5GD1TDs1UgHMIy0c2Yr51dVXEVmOJrlYIkFOuZxOqpHzbsP3FMVtPLw/s72-c/11.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-5108422304858293512</id><published>2011-04-03T22:47:00.007+09:00</published><updated>2011-04-21T23:34:29.638+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="EventReceiver"/><title type='text'>Enable to execute -ed events synchronously or asynchronously in SharePoint 2010</title><content type='html'>In SharePoint 2007, -ed events are executed only&amp;nbsp;&lt;b&gt;asynchronously&lt;/b&gt;.&lt;br /&gt;
This causes some problems between the main thread the and sub thread. For instance, -ed event thread sometimes cannot get its own item&#39;s &quot;afterproperties&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Using SharePoint 2010,&amp;nbsp;&lt;b&gt;-ed events can be executed either synchronously or asynchronously&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
The two Event Receivers are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;-ing events (ItemAdding, ListAdding, etc)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;synchronously&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;-ed events (ItemAdded, ListAdded, etc)&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;synchronously or asynchronously&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
You can write&amp;nbsp;&quot;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;Synchronous&lt;/span&gt;&quot;&amp;nbsp;in Elements.xml in SharePoint EventReciver Project in Visual Studio 2010.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;&amp;lt;Synchronization&amp;gt;Synchronous&amp;lt;/Synchronization&amp;gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;
Listed below are the steps for making a synchronous -ed event:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Create project as Event Receiver.&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2HesGXBxenY3GjfKex21MJu19ZpQzp1rxou3oPqGZJfiGOtpExqQPR4vGqWGqJ4bC6sOGEdwsQ2cXBVmd8SNJANhRBdoL6A6aLljJjF0jeqyDyu2scppkRKD8nYeI5LTJg7jp4FuCPj0/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;440&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2HesGXBxenY3GjfKex21MJu19ZpQzp1rxou3oPqGZJfiGOtpExqQPR4vGqWGqJ4bC6sOGEdwsQ2cXBVmd8SNJANhRBdoL6A6aLljJjF0jeqyDyu2scppkRKD8nYeI5LTJg7jp4FuCPj0/s640/1.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Choose 2 events (ItemAdding and ItemAdded).&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCQz1Pdr3Slwr2CkvtYmNK9_zQZK-eqp2XGavfEn67b6kKvfTOErxcf6_a0k6JZTfllZ3YXMSL46SVdObsX8BXkA7LAVoixTo-ODIP0OxrTBCQmP8Kq3LkiRmL3Sa1eqz6PLXLAXEeTuw/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;317&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCQz1Pdr3Slwr2CkvtYmNK9_zQZK-eqp2XGavfEn67b6kKvfTOErxcf6_a0k6JZTfllZ3YXMSL46SVdObsX8BXkA7LAVoixTo-ODIP0OxrTBCQmP8Kq3LkiRmL3Sa1eqz6PLXLAXEeTuw/s400/2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Write the code. I added the current thread name in ULS log in ItemAdding and ItemAdded method to see status of thread. It is also necessary to add&amp;nbsp;Microsoft.SharePoint.Administration namespace.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;using System;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Security;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.Workflow;
using Microsoft.SharePoint.Administration;

namespace EventReceiverProject4.EventReceiver1
{
&amp;nbsp;&amp;nbsp; &amp;nbsp;/// &amp;lt;summary&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;/// List Item Events
&amp;nbsp;&amp;nbsp; &amp;nbsp;/// &amp;lt;/summary&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;public class EventReceiver1 : SPItemEventReceiver
&amp;nbsp;&amp;nbsp; &amp;nbsp;{
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;summary&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; /// An item is being added.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; public override void ItemAdding(SPItemEventProperties properties)
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Threading.Thread.CurrentThread.Name = &quot;Current Thread&quot;;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string theadName = System.Threading.Thread.CurrentThread.Name;

&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory(&quot;ItemAdding&quot;, TraceSeverity.Unexpected, EventSeverity.Error), TraceSeverity.Unexpected, theadName, theadName);
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; base.ItemAdding(properties);
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; }

&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;summary&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; /// An item was added.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; /// &amp;lt;/summary&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; public override void ItemAdded(SPItemEventProperties properties)
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string theadName = System.Threading.Thread.CurrentThread.Name;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SPDiagnosticsService.Local.WriteTrace(0, new SPDiagnosticsCategory(&quot;ItemAdded&quot;, TraceSeverity.Unexpected, EventSeverity.Error), TraceSeverity.Unexpected, theadName, theadName);
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; base.ItemAdded(properties);
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp;&amp;nbsp; &amp;nbsp;}
}
&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;The ItemAdding and ItemAdded thread names are different because ItemAdded is run asynchronously.&lt;/div&gt;&lt;div&gt;The results are shown here:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;ItemAdding&#39;s thread name :&amp;nbsp;Current Thread&lt;/li&gt;
&lt;li&gt;ItemAdded&#39;s thread name : null&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Next, I added&amp;nbsp;&amp;lt;Synchronization&amp;gt;Synchronous&amp;lt;/Synchronization&amp;gt; in Elements.xml.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;pre class=&quot;Cpp&quot; name=&quot;code&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;
&amp;lt;Elements xmlns=&quot;http://schemas.microsoft.com/sharepoint/&quot;&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;Receivers ListTemplateId=&quot;104&quot;&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Receiver&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Name&amp;gt;EventReceiver1ItemAdding&amp;lt;/Name&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Type&amp;gt;ItemAdding&amp;lt;/Type&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Assembly&amp;gt;$SharePoint.Project.AssemblyFullName$&amp;lt;/Assembly&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Class&amp;gt;EventReceiverProject4.EventReceiver1.EventReceiver1&amp;lt;/Class&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;SequenceNumber&amp;gt;10000&amp;lt;/SequenceNumber&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Synchronization&amp;gt;Synchronous&amp;lt;/Synchronization&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Receiver&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Receiver&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Name&amp;gt;EventReceiver1ItemAdded&amp;lt;/Name&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Type&amp;gt;ItemAdded&amp;lt;/Type&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Assembly&amp;gt;$SharePoint.Project.AssemblyFullName$&amp;lt;/Assembly&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;Class&amp;gt;EventReceiverProject4.EventReceiver1.EventReceiver1&amp;lt;/Class&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;SequenceNumber&amp;gt;10000&amp;lt;/SequenceNumber&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/Receiver&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;lt;/Receivers&amp;gt;
&amp;lt;/Elements&amp;gt;
&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;The Results are shown here:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;ItemAdding&#39;s thread name :&amp;nbsp;Current Thread&lt;/li&gt;
&lt;li&gt;ItemAdded&#39;s thread name :&amp;nbsp;Current Thread&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;These are interesting results !!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/5108422304858293512/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/ed-events-are-able-to-choose-either.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/5108422304858293512'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/5108422304858293512'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/ed-events-are-able-to-choose-either.html' title='Enable to execute -ed events synchronously or asynchronously in SharePoint 2010'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2HesGXBxenY3GjfKex21MJu19ZpQzp1rxou3oPqGZJfiGOtpExqQPR4vGqWGqJ4bC6sOGEdwsQ2cXBVmd8SNJANhRBdoL6A6aLljJjF0jeqyDyu2scppkRKD8nYeI5LTJg7jp4FuCPj0/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1309990416922282847.post-7481031805867123925</id><published>2011-04-03T21:00:00.008+09:00</published><updated>2011-07-27T23:39:44.777+09:00</updated><title type='text'>I&#39;ll start to post blog today !!</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdvKlQTtrOE-abQCDDkixTDKbIXCKK2Gq_2xBRo38uszpjb5OGJjBiUf8cFTLzpbur6EwD0K-ZNJwd0UQ3l9aK13BoE8QLWPn3vsMaELOLF9mCT9UIZYX9DAT3MC5xHmjWrVxZWXlJOrc/s1600/4613806127_2b0c58cd09_z.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdvKlQTtrOE-abQCDDkixTDKbIXCKK2Gq_2xBRo38uszpjb5OGJjBiUf8cFTLzpbur6EwD0K-ZNJwd0UQ3l9aK13BoE8QLWPn3vsMaELOLF9mCT9UIZYX9DAT3MC5xHmjWrVxZWXlJOrc/s400/4613806127_2b0c58cd09_z.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
I believe that today will become a memorial day.&lt;br /&gt;
&lt;div&gt;I will start to write SharePoint dev topic in &quot;English&quot; from today.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I&#39;m a SharePoint developer, and I have some knowledge in C#, ASP.NET, Silverlight, and Windows Phone 7.&lt;/div&gt;&lt;div&gt;I will introduce some effective topics &amp;nbsp;for SharePoint developers.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Please let me know when&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;there are some errors with my English.&lt;/li&gt;
&lt;li&gt;there is something wrong about the technology.&lt;/li&gt;
&lt;li&gt;you have better technology you would like to share.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;thanks !!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sharepointdevelopertopics.blogspot.com/feeds/7481031805867123925/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/ill-start-to-post-blog-today.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/7481031805867123925'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1309990416922282847/posts/default/7481031805867123925'/><link rel='alternate' type='text/html' href='http://sharepointdevelopertopics.blogspot.com/2011/04/ill-start-to-post-blog-today.html' title='I&#39;ll start to post blog today !!'/><author><name>okame100</name><uri>http://www.blogger.com/profile/10962666644503127510</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdvKlQTtrOE-abQCDDkixTDKbIXCKK2Gq_2xBRo38uszpjb5OGJjBiUf8cFTLzpbur6EwD0K-ZNJwd0UQ3l9aK13BoE8QLWPn3vsMaELOLF9mCT9UIZYX9DAT3MC5xHmjWrVxZWXlJOrc/s72-c/4613806127_2b0c58cd09_z.jpg" height="72" width="72"/><thr:total>2</thr:total></entry></feed>