tag:blogger.com,1999:blog-39814772105251483112024-03-05T15:16:22.047-05:00SharePoint Gypsy<b>Advice from Tom Molskow on All Things SharePoint Great and Small - Nearing 200,000 Views!</b>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.comBlogger34125tag:blogger.com,1999:blog-3981477210525148311.post-4579614069240962392012-08-23T21:30:00.000-04:002012-08-23T21:37:34.414-04:00Install PDF iFilter in SharePoint 2010 Foundation<div dir="ltr" style="text-align: left;" trbidi="on">
<strong>Introduction:</strong> Recently a customer asked me to install a PDF IFilter in SP 2010 Foundation. After reading a few blogs and doing some experimentation I learned that this would not be as straight forward as I first thought. The purpose of this blog is to help guide you through this process so you can get it done quickly and easily.<br />
<br />
<strong>1. Why a PDF IFilter?</strong> <br />
<br />
According to Microsoft - "When crawling content, the crawler uses an IFilter to read individual file
types. Some IFilters read only one file type, whereas others can read several
file types. If you have to crawl a file type that is not supported by an IFilter
that is provided with Microsoft SharePoint Server 2010, you must install and
register the appropriate IFilter on the crawl server."<br />
<br />
Since PDF is not "a file type that is not supported by an IFilter that is provided with Microsoft SharePoint Server 2010" you will have to install this IFilter on your search servers if you plan to be able to search inside PDF files. (A complete list of IFilters that are provided by default can be found <a href="http://technet.microsoft.com/en-us/library/gg405170.aspx" rel="nofollow" target="_blank">here</a>.)<br />
<br />
<strong>2. Where can I get the PDF Ifilter for SharePoint 2010?</strong><br />
<br />
The Adobe PDF IFilter 9 for 64-bit platforms is available for download <span id="goog_422872320"></span><a href="http://www.blogger.com/" rel="nofollow" target="_blank">here<span id="goog_422872321"></span></a>.<br />
<br />
<strong>3. Process Overview:</strong><br />
<br />
Before we get started I wanted to give you an overview of the process steps (you will follow these steps on each SharePoint Server that runs the SharePoint Search Service):<br />
<br />
<span dir="ltr">A. Install the PDF IFilter<br />B. Save the PDF file icon to the images folder<br />C. Add the mapping entry to the DocIcon.XML file<br />D. Modifiy the Registry setting (PowerShell)<br />E. Add the extension (PowerShell)<br />F. Stop/Start the SharePoint Search Service (PowerShell)<br />G. Reboot the server<br />H. Run a full crawl<br />I. Run a PDF search test</span><br />
<span dir="ltr"><strong></strong></span><br />
<span dir="ltr"><strong>4. Step A</strong> - <span dir="ltr">A. Install the PDF IFilter</span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr">Once you have downloaded the PDF IFilter from the link above (or <a href="http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=4025&fileID=3941" target="_blank">here</a>), copy the downloaded file to your SharePoint Server, unpack the zip file, and run the PDFFilter64Installer. </span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><strong>5. Step B</strong> - Save the PDF file icon to the images folder</span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr">Download the Adobe PDF file icon from <a href="http://www.adobe.com/misc/linking.html" target="_blank">here</a>. </span></span><span dir="ltr"><span dir="ltr">Save the Adobe PDF file icon to the following file location: </span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr">C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Images\ </span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><strong>6. Step C</strong> - Add the mapping entry to the DocIcon.XML file</span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr">Navigate to this folder - c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Xml</span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr">Make a copy of the DocIcon.xml file. Edit the original DocIcon.xml file using notepad, and add the following entry in the correct location (it should be placed in alphabetical order):</span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><Mapping Key="pdf" Value="pdf16.gif"/></span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><strong>7. PowerShell Script:</strong> </span></span><span dir="ltr"><span dir="ltr">For steps D, E and F we will use the following PowerShell Script from <a href="http://gallery.technet.microsoft.com/office/Activate-pdf-search-in-cc8bc9bc" rel="nofollow" target="_blank">Thierry Buisson</a>:</span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><pre class="powershell"><span class="powerShell__com"><span style="color: green;">################################</span></span>
<span class="powerShell__com"><span style="color: green;"># Thierry BUISSON</span></span>
<span class="powerShell__com"><span style="color: green;"># http://www.thierrybuisson.fr</span></span>
<span class="powerShell__com"><span style="color: green;">#</span></span>
<span class="powerShell__com"><span style="color: green;"># Activate pdf extention for Foundation 2010 Search</span></span>
<span class="powerShell__com"><span style="color: green;"># source http://support.microsoft.com/kb/2518465</span></span>
<span class="powerShell__com"><span style="color: green;">################################</span></span>
<span class="powerShell__keyword"><strong><span style="color: #006699;">function</span></strong></span> AddExtension([string] <span class="powerShell__variable"><span style="color: #aa7700;">$extension</span></span>){
<span class="powerShell__keyword"><strong><span style="color: #006699;">if</span></strong></span> (<span class="powerShell__variable"><span style="color: #aa7700;">$extension</span></span> <span class="powerShell__operator"><span style="color: grey;">-</span></span>eq <span class="powerShell__variable"><span style="color: #aa7700;">$null</span></span>) {
Write<span class="powerShell__operator"><span style="color: grey;">-</span></span>host <span class="powerShell__string"><span style="color: blue;">"No extention Found"</span></span>
}
<span class="powerShell__keyword"><strong><span style="color: #006699;">else</span></strong></span>{
Write<span class="powerShell__operator"><span style="color: grey;">-</span></span>host <span class="powerShell__string"><span style="color: blue;">"Activating extension $extension"</span></span>
<span class="powerShell__variable"><span style="color: #aa7700;">$gadmin</span></span> = <span class="powerShell__cmdlets"><strong><span style="color: #006699;">new-object</span></strong></span> <span class="powerShell__operator"><span style="color: grey;">-</span></span>comobject <span class="powerShell__string"><span style="color: blue;">"SPSearch4.GatherMgr.1"</span></span> <span class="powerShell__operator"><span style="color: grey;">-</span></span>strict
<span class="powerShell__keyword"><strong><span style="color: #006699;">Foreach</span></strong></span> (<span class="powerShell__variable"><span style="color: #aa7700;">$application</span></span> <span class="powerShell__keyword"><strong><span style="color: #006699;">in</span></strong></span> <span class="powerShell__variable"><span style="color: #aa7700;">$gadmin</span></span>.GatherApplications)
{
write<span class="powerShell__operator"><span style="color: grey;">-</span></span>host <span class="powerShell__string"><span style="color: blue;">"application name is $application.name"</span></span>
<span class="powerShell__keyword"><strong><span style="color: #006699;">Foreach</span></strong></span> (<span class="powerShell__variable"><span style="color: #aa7700;">$project</span></span> <span class="powerShell__keyword"><strong><span style="color: #006699;">in</span></strong></span> <span class="powerShell__variable"><span style="color: #aa7700;">$application</span></span>.GatherProjects)
{
write<span class="powerShell__operator"><span style="color: grey;">-</span></span>host <span class="powerShell__variable"><span style="color: #aa7700;">$project</span></span>.Extensions
<span class="powerShell__variable"><span style="color: #aa7700;">$project</span></span>.Gather.Extensions.Add(<span class="powerShell__variable"><span style="color: #aa7700;">$extension</span></span>)
}
}
}
}
<span class="powerShell__keyword"><strong><span style="color: #006699;">function</span></strong></span> AddPdfRegKey(){
<span class="powerShell__variable"><span style="color: #aa7700;">$pdfKey</span></span> = <span class="powerShell__string"><span style="color: blue;">"HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Search\Setup\ContentIndexCommon\Filters\Extension\.pdf"</span></span>
<span class="powerShell__variable"><span style="color: #aa7700;">$pdfguid</span></span> = <span class="powerShell__string"><span style="color: blue;">"{E8978DA6-047F-4E3D-9C78-CDBE46041603}"</span></span>
<span class="powerShell__keyword"><strong><span style="color: #006699;">if</span></strong></span> (<span class="powerShell__cmdlets"><strong><span style="color: #006699;">Test-Path</span></strong></span> <span class="powerShell__variable"><span style="color: #aa7700;">$pdfKey</span></span>) {
write<span class="powerShell__operator"><span style="color: grey;">-</span></span>host <span class="powerShell__string"><span style="color: blue;">"Pdf registry key already exists"</span></span>
<span class="powerShell__variable"><span style="color: #aa7700;">$key</span></span> = <span class="powerShell__cmdlets"><strong><span style="color: #006699;">Get-Item</span></strong></span> <span class="powerShell__variable"><span style="color: #aa7700;">$pdfKey</span></span>
<span class="powerShell__variable"><span style="color: #aa7700;">$values</span></span> = <span class="powerShell__cmdlets"><strong><span style="color: #006699;">Get-ItemProperty</span></strong></span> <span class="powerShell__variable"><span style="color: #aa7700;">$key</span></span>.PSPath
<span class="powerShell__keyword"><strong><span style="color: #006699;">foreach</span></strong></span> (<span class="powerShell__variable"><span style="color: #aa7700;">$value</span></span> <span class="powerShell__keyword"><strong><span style="color: #006699;">in</span></strong></span> <span class="powerShell__variable"><span style="color: #aa7700;">$key</span></span>.Property) { <span class="powerShell__variable"><span style="color: #aa7700;">$value</span></span> <span class="powerShell__operator"><span style="color: grey;">+</span></span> <span class="powerShell__string"><span style="color: blue;">"="</span></span> <span class="powerShell__operator"><span style="color: grey;">+</span></span> <span class="powerShell__variable"><span style="color: #aa7700;">$values</span></span>.<span class="powerShell__variable"><span style="color: #aa7700;">$value</span></span> }
}
<span class="powerShell__keyword"><strong><span style="color: #006699;">else</span></strong></span> {
Write<span class="powerShell__operator"><span style="color: grey;">-</span></span>host <span class="powerShell__string"><span style="color: blue;">"creating key $pdfKey"</span></span>
<span class="powerShell__com"><span style="color: green;">#create key</span></span>
<span class="powerShell__cmdlets"><strong><span style="color: #006699;">New-Item</span></strong></span> <span class="powerShell__operator"><span style="color: grey;">-</span></span>Path <span class="powerShell__variable"><span style="color: #aa7700;">$pdfKey</span></span>
<span class="powerShell__com"><span style="color: green;">#Set default value to good guid</span></span>
<span class="powerShell__variable"><span style="color: #aa7700;">$defaultKeyName</span></span> = <span class="powerShell__string"><span style="color: blue;">"(default)"</span></span>
<span class="powerShell__cmdlets"><strong><span style="color: #006699;">Set-ItemProperty</span></strong></span> <span class="powerShell__operator"><span style="color: grey;">-</span></span>Path <span class="powerShell__variable"><span style="color: #aa7700;">$pdfKey</span></span> <span class="powerShell__operator"><span style="color: grey;">-</span></span>Name <span class="powerShell__variable"><span style="color: #aa7700;">$defaultKeyName</span></span> <span class="powerShell__operator"><span style="color: grey;">-</span></span>Value <span class="powerShell__variable"><span style="color: #aa7700;">$pdfguid</span></span>
}
}
AddPdfReqKey
AddExtension <span style="color: blue;">"pdf"</span>
<span class="powerShell__operator"><span style="color: grey;">&</span></span> net stop SPSearch4
<span class="powerShell__operator"><span style="color: grey;">&</span></span> net start SPSearch4
</pre>
</span></span><span dir="ltr"><span dir="ltr"><strong>8. Step D</strong> - Modifiy the Registry setting (PowerShell)</span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr">To make the neccessary registry entries the script will run the "AddPdfRegKey" function. </span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><strong>9. Step E</strong> - Add the extension (PowerShell)</span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><span dir="ltr"><span dir="ltr">To add the extension the script will run the "AddExtension" function. </span></span><br />
<span dir="ltr"><span dir="ltr"> </span></span></span></span><span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><strong>10. Step F</strong> - Stop/Start the SharePoint Search Service (PowerShell)</span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><span dir="ltr"><span dir="ltr">To stop/start the SharePoint Search Service the script will run the "net stop SPSearch4" and "net start SPSearch4" functions. </span></span></span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><strong>11. Step G</strong> - Reboot the server</span></span><br />
<span dir="ltr"><span dir="ltr"></span></span><br />
<span dir="ltr"><span dir="ltr"><strong>12. Repeat the Steps Above -</strong> Repeat the steps above on anny additional SharePoint server that have the SharePoint Serach Service running on them. (I know it is uncommon to have more than one search server - especially in Foundation - but this kind of b uild can actually be done as well).</span></span><br />
<span dir="ltr"><span dir="ltr"><br /><strong>12. Step H</strong> - Run a full crawl<br />
<br />
Run a full crawl on the SharePoint Search Server by using the following stsadm command (be sure you have added some PDF content to each of the web applications before running the full crawl):<br />
<br />
stsadm -o spsearch -action fullcrawlstart<br />
<br /><strong>13. Step I</strong> - Run a PDF search test<br />
<br />
Go to your sites that have PDF content and run a search for the content inside those PDF files.</span></span><strong>Conclusion:</strong> Installing a PDF IFilter to your SharePoint 2010 Foundation Search Server(s) can be cahllenging, but by following this process you should be able to get this process done quickly and easily.<br />
<br />
I hope that helps!<br />
<br />
Tom<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com3tag:blogger.com,1999:blog-3981477210525148311.post-20137676249874802462012-06-28T20:01:00.002-04:002012-06-28T20:03:14.504-04:00Policies for Managing SharePoint Designer 2010<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;"> Many of my customers are concerned with how they manage SharePoint Designer 2010 in the enterprise environment. SharePoint Designer 2010 is a great tool, but unfortunately, in the hands of a undisciplined or inexperienced individual it can do great damage. The purpose of this post
is to provide suggested management policies for the use of SharePoint Designer 2010 in
the enterprise and development environments.</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;"> SharePoint Designer 2010
has many new or enhanced features that can be leveraged to create advanced SharePoint
2010 designs and solutions, for example:<span style="mso-spacerun: yes;">
</span><o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">a.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Reusable Workflows <o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">b.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">External Content Types and Lists
(Utilizing BCS)<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">c.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Site and List Content Types<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">d.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>XSLT List View Web Parts <o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">e.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">List\Library Data Connections<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">f.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Advanced
CSS for Branding<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">g.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Advanced Master Pages</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;"> Given that SharePoint
Designer 2010 is a powerful tool for developers and designers, the concern any
SharePoint Team must address is how to properly secure and manage the use of
SharePoint Designer in the enterprise SharePoint environments. </span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">The following are my recommended best practice policies for managing
SharePoint Designer 2010:</span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">a.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Production: Disable the direct use of
SharePoint Designer 2010 against any production SharePoint farms<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">b.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Development: As needed per project enable
the direct use of SharePoint Designer 2010 against any required Site
Collections in the development environment<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">c.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Desktop: Only install SharePoint
Designer 2010 to the desktop of trained and knowledgeable SharePoint developers
and designers.<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">d.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Process: Follow a normal SLDC process
for the definition, design, test, deployment and maintenance of SharePoint
Designer 2010 workflows.</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;"> Production: Disable the direct use of
SharePoint Designer 2010 against any production web applications in the SharePoint
farms.</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">a.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From Central Administration ->
Application Management -> Manage Web Applications<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">b.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From the Manage Web Applications
interface choose the first web application and then select General Settings
-> SharePoint Designer<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">c.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From the SharePoint Designer Settings
interface uncheck all the “Enable” features:<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">i.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Uncheck
- Enable SharePoint Designer<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">ii.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Uncheck
- Enable Detaching Pages from the Site Definition<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">iii.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Uncheck
- Enable Customizing Master Pages and Layout Pages<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">iv.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Uncheck
- Enable Managing of the Web Site URL Structure<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">d.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Repeat step “c” above for all web
applications in the production farm<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">e.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Once these steps are completed no designer\developer,
regardless of their permissions or access, can modify any production site in
any way with SharePoint Designer 2010</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;"> Development: As needed per design project
enable the direct use of SharePoint Designer 2010 against any required Site
Collections in the development environment.</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">a.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From Central Administration ->
Application Management -> Manage Web Applications<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">b.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From the Manage Web Applications
interface choose the web application that will be used for the design project
and then select General Settings -> SharePoint Designer<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">c.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From the SharePoint Designer Settings
interface check all the “Enable” features:<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">i.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">check
- Enable SharePoint Designer<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">ii.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">check
- Enable Detaching Pages from the Site Definition<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">iii.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">check
- Enable Customizing Master Pages and Layout Pages<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">iv.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">check
- Enable Managing of the Web Site URL Structure<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">d.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Once these steps are completed users
with the correct site permissions and access to SharePoint Designer 2010 on
their desktops can access and modify any development site in any site
collection within the web application for which we enabled SharePoint Designer
2010<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">e.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Since we want to restrict the use of
SharePoint Designer 2010 to just the design project site collection we now need
to disable the use of SharePoint Designer 2010 within any site collections that
are not going to be part of the design project<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">f.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From
Central Administration -> Application Management -> View All Site
Collections<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">g.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From the Site Collections List choose
the web application that will be used for the design project from the drop down
list in the top right hand corner<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">h.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From the URL pane on the left portion
of the interface click on the first site collection that will not be used for
the design project<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">i.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From
the information pane on the right copy the full URL of the Site Collection<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">j.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Open
a new browser and paste the URL into the browser’s address field and then
navigate to the Site Collection<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">k.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From the Site Collection Home Page
choose -> Site Actions -> Site Settings<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">l.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From
the Site Settings Page under the Site Collection Administration heading choose
SharePoint Designer Settings<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">m.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">From the SharePoint Designer Settings
interface uncheck all the “Enable” features:<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">i.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Uncheck
- Enable SharePoint Designer<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">ii.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Uncheck
- Enable Detaching Pages from the Site Definition<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">iii.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Uncheck
- Enable Customizing Master Pages and Layout Pages<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">iv.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Uncheck
- Enable Managing of the Web Site URL Structure<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">n.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Repeat steps “h” through “m” above
for all web applications in the production farm<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">o.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Once these steps are completed designer\developers
can only modify the specific design project site in the development environment
with SharePoint Designer 2010</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;"> Desktop: Install SharePoint Designer
2010 to the desktop of trained and knowledgeable SharePoint developers and
power users.</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">a.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Request for the install of SharePoint
Designer 2010 to a user’s desktop should be reviewed and approved by the
SharePoint Team<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">b.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Before approving the install the
SharePoint Team should verify the following:<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">i.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">The
requesting user has received the approval of their project\team lead for the
request<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">ii.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">There
is a direct project need for SharePoint Designer 2010<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1; mso-text-indent-alt: -9.0pt; text-indent: -1.5in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span><span style="font-family: Calibri;">iii.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">The
requesting user has had sufficient experience and\or training to properly use
SharePoint Designer for the project task for which it is intended</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;"> Process: Follow a normal SLDC process
for the definition, design, test, deployment and maintenance of SharePoint
Designer 2010 workflows.<span style="mso-spacerun: yes;"> </span>As a minimum
the following steps should occur:</span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">a.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">The requirements for the SharePoint
Designer 2010 solution are documented<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">b.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">The designs for the SharePoint
Designer 2010 solution are documented<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">c.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">The tests for the SharePoint Designer
2010 solution are documented<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">d.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">The SharePoint Designer 2010 solution
is packaged for deployment to the staging and production environments<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">e.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";"> </span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">The deployment instructions for the
SharePoint Designer 2010 solution are documented<o:p></o:p></span></span></div>
<br />
<div class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"><span style="mso-list: Ignore;"><span style="font-family: Calibri;">f.</span><span style="font-size-adjust: none; font-stretch: normal; font: 7pt/normal "Times New Roman";">
</span></span></span><span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>The maintenance instructions for the
SharePoint Designer 2010 solution are documented </span></span><span style="font-size: 12pt; line-height: 115%;"><o:p><span style="font-family: Calibri;"> </span></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;"><span style="mso-spacerun: yes;"> </span>With all the capabilities that come with
SharePoint Designer 2010 also comes the need to properly secure and manage this
advanced design tool so that great SharePoint solutions can be built within the
ALCOA SharePoint environments.</span></span></div>
<div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<br /></div>
<div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">I hope that helps!</span></span></div>
<div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<span style="font-size: 12pt; line-height: 115%;"><span style="font-family: Calibri;">Tom</span></span></div>
<div class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1; text-indent: -0.25in;">
<br /></div>
</div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-16184219786266209492012-06-06T11:45:00.003-04:002012-06-06T11:45:50.573-04:00Development<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://sharepointgypsy.blogspot.com/2010/10/develop-sharepoint-2007-event-handler.html" target="_blank">Develop a SharePoint 2007 Event Handler (Part 1)</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/10/develop-sharepoint-2007-event-handler_06.html" target="_blank">Develop a SharePoint 2007 Event Handler (Part 2)</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/10/develop-sharepoint-2007-event-handler_07.html" target="_blank">Develop a SharePoint 2007 Event Handler (Part 3)</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/10/develop-sharepoint-2007-event-handler_20.html" target="_blank">Develop a SharePoint 2007 Event Handler (Part 4)</a> <br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/10/set-up-sharepoint-2007-development.html" target="_blank">Set Up a SharePoint 2007 Development Environment</a> <br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/08/checklist-for-virtual-sharepoint-2007.html" target="_blank">Checklist for a Virtual SharePoint 2007 Developer's Build</a> <br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/08/deploy-and-retract-custom-web-part-in.html" target="_blank">Deploy and Retract a Custom Web Part in SharePoint 2007</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/12/sharepoint-development-improving.html" target="_blank">SharePoint Development - Improving the Performance of the For Each Loop and SPQuery Object</a> </div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com1tag:blogger.com,1999:blog-3981477210525148311.post-63958181178211135812012-06-06T11:29:00.002-04:002012-06-06T11:29:47.050-04:00Migration<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://sharepointgypsy.blogspot.com/2012/03/migrate-in-process-workflows-from-moss.html" target="_blank">Migrate In-Process Workflows from MOSS 2007 to SPS 2010 (Part 1 of 2)</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2012/03/migrate-in-process-workflows-from-moss_26.html" target="_blank">Migrate In-Process Workflows from MOSS 2007 to SPS 2010 (Part 2 of 2)</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/08/moss-2007-to-sharepoint-2010-migration.html" target="_blank">MOSS 2007 to SharePoint 2010 Migration - Lessons Learned</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/08/yes-virginia-there-is-easy-way-to.html" target="_blank">Yes Virginia, There is an Easy Way to Migrate SharePoint Designer Workflows</a><br />
<br />
</div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-13424354676168039022012-06-06T11:23:00.003-04:002012-06-06T11:23:26.304-04:00For Each Loop<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://sharepointgypsy.blogspot.com/2011/11/create-for-each-loop-for-workflows.html" target="_blank">Create a For Each Loop for Workflows Using SharePoint Designer 2010</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/12/sharepoint-development-improving.html" target="_blank">SharePoint Development - Improving the Performance of the For Each Loop and SPQuery Object</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/01/sharepoint-designer-workflows-2.html" target="_blank">SharePoint Designer Workflows 2 – Developing a For Each Loop for Workflows</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/11/k2-blackpoint-work-around-1-update.html" target="_blank">K2 BlackPoint Work Around – Update Every Item in a List</a> </div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-62017668119156750502012-06-06T00:00:00.000-04:002012-06-06T00:00:16.169-04:00JavaScript Posts<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://sharepointgypsy.blogspot.com/2010/12/sharepoint-2007-form-validation-using.html" target="_blank">SharePoint 2007 Form Validation Using JavaScript</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/02/how-to-manipulate-people-picker-control.html" target="_blank">How to Manipulate the People Picker Control Using JavaScript</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/12/sharepoint-dynamic-field-hide-or-reveal.html" target="_blank">SharePoint Form Dynamic Field Hide or Reveal Using JavaScript</a> <br />
<br />
</div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-42960173066506137072012-06-05T23:48:00.000-04:002012-06-28T20:05:46.949-04:00Workflow Posts<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: left;">
<span style="font-family: Calibri;"></span></div>
<a href="http://sharepointgypsy.blogspot.com/2012/03/migrate-in-process-workflows-from-moss.html" target="_blank">Migrate In-Process Workflows from MOSS 2007 to SPS 2010 (Part 1 of 2)</a> <br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2012/03/migrate-in-process-workflows-from-moss_26.html" target="_blank">Migrate In-Process Workflows from MOSS 2007 to SPS 2010 (Part 2 of 2)</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/10/create-state-machine-workflow-with.html" target="_blank">Create a State Machine Workflow with SharePoint Designer 2010 - Part 1</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/10/create-state-machine-workflow-with_26.html" target="_blank">Create a State Machine Workflow with SharePoint Designer 2010 - Part 2</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/01/sharepoint-designer-2007-workflows-best.html" target="_blank">SharePoint Designer 2007 Workflows 1 – Best Practice Solution for Logging Runtime Workflow Errors</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/01/sharepoint-designer-workflows-2.html" target="_blank">SharePoint Designer Workflows 2 – Developing a For Each Loop for Workflows</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/01/sharepoint-designer-workflows-3.html" target="_blank">SharePoint Designer Workflows 3 - Developing a Timer Loop for Workflows</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/11/create-for-each-loop-for-workflows.html" target="_blank">Create a For Each Loop for Workflows Using SharePoint Designer 2010</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2011/07/sharepoint-designer-2007-business-days.html" target="_blank">SharePoint Designer 2007 – Business Days Task Reminder Workflow</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/12/why-you-should-try-new-sharepoint.html" target="_blank">Why You Should Try The New Sharepoint Designer 2010 Workflows</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/08/yes-virginia-there-is-easy-way-to.html" target="_blank">Yes Virginia, There is an Easy Way to Migrate SharePoint Designer Workflows</a><br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2010/11/k2-blackpoint-work-around-1-update.html" target="_blank">K2 BlackPoint Work Around – Update Every Item in a List</a> <br />
<br />
<a href="http://sharepointgypsy.blogspot.com/2012/06/policies-for-managing-sharepoint.html" target="_blank">Policies for Managing SharePoint Designer 2010</a></div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-10327316280657100572012-03-26T07:57:00.001-04:002012-04-04T08:44:37.793-04:00Migrate In-Process Workflows from MOSS 2007 to SPS 2010 (Part 2 of 2)<div dir="ltr" style="text-align: left;" trbidi="on">
Part 1 of this Article is Located - <a href="http://sharepointgypsy.blogspot.com/b/post-preview?token=p0OyQjYBAAA.Yoh4FjA8HcVPYnvhyLnggw.p-7tZmSyzoURu08LmkNjWA&postId=1208948574448565133&type=POST" target="_blank">Here</a><br />
<br />
Okay, now that we have a deeper understanding of the workflow process, and we have inspected our MOSS 2007 workflows to ensure they are ready to migrate, we are now ready to start the step-by-step methodology to migrate our in-process workflow:<br />
<br />
(Two quick notes, the steps that follow are not all the steps involved in a SharePoint migration, and these steps assume the use of the <a href="http://technet.microsoft.com/en-us/library/cc263299.aspx" target="_blank">Database Attach Upgrade Method</a>).<br />
<br />
<strong>Steps on the MOSS 2007 Server:</strong><br />
<br />
1. Run: stsadm -o preUpgradeCheck, Correct any Errors<br />
<br />
2. Stop All Workflow Auto Cleanup Timer Jobs <br />
<br />
<ul style="text-align: left;">
<li>Central Administration > Operations > Timer Job Definitions > Edit Timer Job > Workflow Auto Cleanup - Disable</li>
</ul>
<br />
3. Quiesce the Farm<br />
<br />
<ul style="text-align: left;">
<li>Central Administration > Operations > Quiesce Farm - Start Quiescing - 5 minutes (more for production) </li>
<li>Allow Quiesce to complete </li>
</ul>
<br />
4. Provide Sufficient Time for In-Memory/In-Process Workflows to Dehydrate (Usually No More Than 2 Hours)<br />
<br />
5. Set the Content Database to Read Only<br />
<br />
<ul style="text-align: left;">
<li>SQL Server Management Studio > Databases > WSS_Content_MyCDB > Properties > Options > State > Database Read Only > True</li>
</ul>
<br />
6. Run PowerShell Command<br />
<br />
<ul style="text-align: left;">
<li>Start > All Programs >Accessories > Windows PowerShell > Windows PowerShell ISE</li>
<li>Test-SPContentDatabase -Name WSS_Content_cdbTestIPWF -WebApplication http://shrpnt2007:8000/</li>
</ul>
<br />
7. Backup the Database<br />
<br />
<ul style="text-align: left;">
<li>SQL Server Management Studio > Management > Backup > Accept Defaults > OK</li>
<li>C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\ </li>
</ul>
<br />
<strong>Steps on the SPS 2010 Server:</strong><br />
<br />
1. Copy Workflow Solution Package to the SPS 2010 Server<br />
<br />
<ul style="text-align: left;">
<li>C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN</li>
</ul>
<br />
2. Deploy Custom Workflow WSP to Solution Management Store<br />
<ul style="text-align: left;">
<li>stsadm -o addsolution -filename <mycustomwf.wsp></li>
<li>stsadm -o deploysolution -name <mycustomwf.wsp>-immediate -allowGacDeployment</li>
</ul>
<br />
3. Copy Restore Database to...<br />
<ul style="text-align: left;">
<li>C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup</li>
</ul>
<br />
4. Stop All Workflow Auto Cleanup Timer Jobs<br />
<br />
<ul style="text-align: left;">
<li>Central Administration > Monitoring > Timer Jobs > Job Definitions > Workflow Auto Cleanup for <web application="">> Disable</li>
</ul>
<br />
5. Remove CDB Database from <web application=""><br />
<ul style="text-align: left;">
<li>Central Administration > Application Management > Databases > Manage Content Databases > <mycdb>> Remove Content Database > OK</li>
</ul>
<br />
6. Reset IIS - IISReset<br />
<br />
7. Set the Content Database to Read Only<br />
<br />
<ul style="text-align: left;">
<li>SQL Server Management Studio > Databases > WSS_Content_MyCDB > Properties > Options > State > Database Read Only > True</li>
</ul>
<br />
8. Restore Database to SQL Server<br />
<ul style="text-align: left;">
<li>SQl Server Management Studio > Databases > Restore Database > </li>
<li>General</li>
<ul>
<li>To Database (SPS 2010 CDB)</li>
<li>From Device (MOSS 2007 Backup Copy)</li>
<li>Check Restore</li>
</ul>
<li>Options</li>
<ul>
<li>Overwrite the Existing Database</li>
</ul>
</ul>
<br />
9. Set Read Only Back to False<br />
<br />
<ul style="text-align: left;">
<li>SQL Server Management Studio > Databases > WSS_Content_MyCDB > Properties > Options > State > Database Read Only > False</li>
</ul>
<br />
10. Mount/Migrate the Database<br />
<ul style="text-align: left;">
<li>stsadm -o addcontentdb -url http://sp2010srv:8000 -databasename WSS_Content_cdbTestIPWF</li>
</ul>
<br />
11. Attach the Database to the Web Application<br />
<br />
<ul style="text-align: left;">
<li>CA > Application Management > Databases > Manage Content Databases > Add a Content Database > Database Name </li>
</ul>
<br />
12. Restart All Workflow Auto Cleanup Timer Jobs<br />
<br />
<ul style="text-align: left;">
<li>Central Administration > Monitoring > Timer Jobs > Job Definitions > Workflow Auto Cleanup for > Enable</li>
</ul>
<br />
<strong>Go to the SPS 2010 Sites, Lists and Libraries and test your migrated in-process workflows!</strong><br />
<br />
<br />
I hope that helps!<br />
<br />
Tom<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-12089485744485651332012-03-26T07:52:00.000-04:002012-06-05T23:33:43.329-04:00Migrate In-Process Workflows from MOSS 2007 to SPS 2010 (Part 1 of 2)<div dir="ltr" style="text-align: left;" trbidi="on">
Part 2 of this Article is Located - <a href="http://sharepointgypsy.blogspot.com/2012/03/migrate-in-process-workflows-from-moss_26.html" target="_blank">Here</a><br />
<br />
Recently I had the opportunity to develop a methodology for migrating in-process SharePoint workflows from MOSS 2007 to SPS 2010. As you may be aware, in-process workflows are those workflows which have been started but which are not yet completed. In this two part article I will provide a step-by-step methodology for migrating in-process workflows and thereby avoiding the gotcha's that are out there waiting for you. <br />
<br />
<div style="text-align: center;">
<strong><u>Understanding In-Process Workflow Migration</u></strong></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
Before I dive into my methodology I wanted to provide a little background understanding of workflow processing:</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
<strong>Starting:</strong> Workflows can be Started in a Number of Different Ways</div>
<div style="text-align: center;">
<ul style="text-align: left;">
<li>Manually</li>
<li>When an Item is Created</li>
<li>When an Item is Changed</li>
<li>Programmatically Through the API</li>
<li>Programmatically Through the Web Service</li>
</ul>
</div>
<br />
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<strong> Hosting: </strong>Workflows can be Hosted by a Number of Different Processes </div>
<div style="text-align: left;">
<ul style="text-align: left;">
<li>W3wp.exe – When Started from the SharePoint Interface</li>
<li>Owstimer.exe – When the Workflow is Delayed</li>
<li>The Programmatic Process that Executes the Workflow Code</li>
</ul>
</div>
<br />
<div style="text-align: left;">
<strong>Delayed:</strong> When the Workflow Action needs to be Delayed the Workflow <strong>Dehydration</strong> Process Occurs</div>
<ul style="text-align: left;">
<li><div style="text-align: left;">
The Windows Workflow Foundation Calls the SQL Workflow Persistence Service</div>
</li>
<li><div style="text-align: left;">
The SQL Workflow Persistence Service</div>
</li>
<ul>
<li><div style="text-align: left;">
Assigns Correlation Token to Task</div>
</li>
<li><div style="text-align: left;">
Serializes Workflow Object – Turns Into Binary String</div>
</li>
<li><div style="text-align: left;">
Saves with a Unique ID in the Content Database</div>
</li>
</ul>
</ul>
<br />
<strong>Reactivated:</strong> When the Workflow Action Needs to be Carried Out the Workflow <strong>Rehydration</strong> Process Occurs<br />
<ul style="text-align: left;">
<li>The Windows Workflow Foundation Calls the SQL Workflow Persistence Service</li>
<li>The SQL Workflow Persistence Service</li>
<ul>
<li>Finds the Workflow task Using the Unique ID</li>
<li>Deserializes Workflow Object – Turns Binary String Back Into an Object in Memory</li>
<li>Performs Many Checks to Ensure the Right Workflow Object is Returned</li>
</ul>
</ul>
<br />
<div>
<strong> In-Process and In-Memory Workflows: </strong><span style="font-family: Calibri;">Workflows can be In-Process and In-Memory (Not Dehydrated)</span></div>
<ul style="text-align: left;">
<li>Any Workflows that are <strong>In-Process <em>and</em> In-Memory</strong> will be Lost in Migration</li>
<li>Custom Workflow Code can Prevent Workflows from Dehydrating – Therefore They Persist in Memory</li>
</ul>
<br />
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<strong>DelayActivity – UnloadOnIdle: </strong><span style="font-family: Calibri;">In-Process Workflows can be persisted in memory programmatically</span></div>
<ul style="text-align: left;">
<li><div style="text-align: left;">
If Custom Workflow Code Uses a Delay Activity and UnloadOnIdle Property is Set to False the Workflow Object will Persist in Memory</div>
</li>
<li><div style="text-align: left;">
Custom Code Must be Reviewed and if Necessary Modified to Prevent UnloadOnIdle from Persisting Workflow Objects – Set Property to True</div>
</li>
</ul>
<br />
<div>
<strong>External Applications: </strong>If External Application Activate Workflows Within SharePoint then Those Workflows Could be In-Progress and In-Memory When Migration Occurs!</div>
<br />
<div>
<br />
<div style="text-align: center;">
<strong><u>Preparing for In-Process Workflow Migration</u> </strong></div>
<br />
Okay, now armed with this greater understanding we are ready to prepare for our workflow migration. To start the process we must inspect the workflows on the MOSS 2007 Server Farm with concern for the following:<br />
<br /></div>
<div>
</div>
<div>
<strong>Ensure Workflows are Functioning Properly: </strong><span style="font-family: Calibri;">Before attempting to perform a migration of In-Process Workflows you must first be sure the workflows are functioning properly</span></div>
<ul style="text-align: left;">
<li>Review ULS and Event Logs For Any Signs of Issues Related to Workflows</li>
<li>Correct Issues Before Attempting Migration</li>
</ul>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<br />
<strong>Ensure DelayActivity – UnloadOnIdle is Set to True: </strong><span style="font-family: Calibri;">You must also inspect any custom code to ensure it does not prevent the Workflow Dehydration Process</span></div>
<ul style="text-align: left;">
<li><div style="text-align: left;">
Review Custom Workflow Code – Ensure UnloadOnIdle is Set to True</div>
</li>
<li><div style="text-align: left;">
Correct Any Code that Sets UnloadOnIdle to False</div>
</li>
</ul>
<br />
<div>
<strong>Run PreUpgrade Checker and Review Results: </strong><span style="font-family: Calibri;">Run the preupgradecheck command on the Content Database(s) that is being migrated – inspect for additional key issues</span></div>
<ul style="text-align: left;">
<li>Issue ID: 956447 - The Declarative Workflow Actions File has been Modified</li>
<li>Issue ID: 956448 - The Custom .ACTIONS Files Exist in the Farm</li>
<li>Issue ID: 956449 - The Web.Config File Contains Modified Authorized Types for Workflows</li>
</ul>
<br />
<div>
If your Moss 2007 workflows meet all this criteria then they are ready for migration!</div>
<div>
</div>
<div>
<br />
In part 2 of this article (coming soon!) I will provide the step-by-step process I use for migrating in-process workflows.<br />
<br />
Many thanks to the great blog I found on the <a href="http://www.the14folder.com/2010/07/25/migrating-workflows-question/" target="_blank">14 folder</a>.<br />
<br />
<br /></div>
<div>
</div>
<div>
</div>
<div>
I hope that helps!</div>
<div>
</div>
<div>
<br />
Tom</div>
<br />
<br />
<div style="text-align: left;">
<br /></div>
</div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-282974152755839322011-12-12T20:31:00.001-05:002011-12-13T16:13:11.744-05:00SharePoint Development - Improving the Performance of the For Each Loop and SPQuery Object<div dir="ltr" style="text-align: left;" trbidi="on">Recently I have been very focused on optimizing SharePoint code and so I thought I'd put together all my techniques for writing more effecient code when working with the For Each Loop and/or SPQuery Object. If anyone has any additional techniques please post comments!<br />
<br />
References: <br />
<a href="http://www.zimmergren.net/archive/2008/05/04/how-to-sharepoint-queries.aspx">http://www.zimmergren.net/archive/2008/05/04/how-to-sharepoint-queries.aspx</a><br />
<a href="http://msdn.microsoft.com/en-us/library/ee558807(v=office.14).aspx">http://msdn.microsoft.com/en-us/library/ee558807(v=office.14).aspx</a><br />
<a href="http://andreasgrabner.sys-con.com/node/1348618/mobile">http://andreasgrabner.sys-con.com/node/1348618/mobile</a><br />
<br />
1.For Large Lists Use SPQuery with For Each Loops to reduce the number of items returned:<br />
<br />
<span style="color: blue;">SPList</span> myList = <span style="color: blue;">SPContext</span>.Current.Web.Lists["Example List"]; <br />
<span style="color: blue;">StringBuilder</span> camlQuery = new <span style="color: blue;">StringBuilder</span>();<br />
camlQuery.Append(<span style="color: red;"><span style="color: #a31515; font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">"<Where>"</span></span><where>);<br />
camlQuery.Append<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"<Eq>"</span>);</span></where><br />
<where><span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;"></span><eq>camlQuery.Append<span style="font-family: Consolas; font-size: 9.5pt;">(<span style="color: #a31515;">"<FieldRef Name='Category' />"</span>);</span><fieldref name="Category"><br />
camlQuery.Append<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"<Value Type='Text'>"</span>);</span><value type="Text"><br />
camlQuery.Append<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"{Category 1}"</span>);</span><br />
camlQuery.Append<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"</Value>"</span>);</span></value><br />
camlQuery.Append<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"</Eq>"</span>);</span></fieldref></eq><br />
camlQuery.Append<span style="font-family: Consolas; font-size: 9.5pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"</Where>"</span>, ID);<span style="color: #a31515;"> </span></span></where> <br />
<br />
<span style="color: blue;">SPQuery</span> query = new <span style="color: blue;">SPQuery</span>(); <br />
query.Query = camlQuery.ToString();<br />
<span style="color: #38761d;">//ID comes as a parameter to the method being called</span><br />
<br />
<span style="color: blue;">SPListItemCollection</span> listItems = myList.GetItems(query); <br />
for(int i=0;i<100 && i< listItems.Count;i++) {<br />
<span style="color: blue;">SPListItem</span> myListItem = listItems[i];<br />
htmlWriter.Write(myListItem["Title"]);}<br />
<br />
2.Use <span style="color: blue;">SPListItemCollection</span> instead of <span style="color: blue;">SPList</span>:<br />
<br />
In the example below, every time we access the Items property in the For Loop condition (myList.Items.Count) it queries all items from the Content Database - the retrieved items are never cached!<br />
<br />
<span style="color: blue;">SPList</span> myList = <span style="color: blue;">SPContext</span>.Current.List;<br />
for(int i=0;i<100 && i< myList.Items.Count;i++) {<br />
<span style="color: blue;">SPListItem</span> myListItem = myList.Items[i];<br />
htmlWriter.Write(myListItem ["Title"]);}<br />
<br />
In this next example the database is queried only once and from then on we work with an in-memory collection of all the retrieved list items. In this simple example alone we saved an additional 199 trips to the database!<br />
<br />
<span style="color: blue;">SPListItemCollection</span> myItems = <span style="color: blue;">SPContext</span>.Current.List.Items;<br />
for(int i=0;i<100 && i< myItems.Count;i++) {<br />
<span style="color: blue;">SPListItem</span> myListItem = myItems[i];<br />
htmlWriter.Write(myListItem["Title"]);}<br />
<br />
3.Set the <span style="color: blue;">SPQuery</span> RowLimit Property to limit the number of items returned:<br />
<br />
<span style="color: blue;">SPQuery</span> myQuery = new <span style="color: blue;">SPQuery</span>();<br />
myQuery.RowLimit = 100; <br />
myQuery.ListItemCollectionPosition = prevItems.ListItemCollectionPosition;<br />
<span style="color: #38761d;">//The code above will start the cursor at the previous position</span><br />
<span style="color: blue;">SPListItemCollection</span> items = <span style="color: blue;">SPContext</span>.Current.List.GetItems(myQuery);<br />
<br />
4.Limit the number of returned columns by using the <span style="color: blue;">SPQuery</span> ViewFields property:<br />
<br />
<span style="color: blue;">SPQuery</span> myQuery = new SPQuery();<br />
myQuery.ViewFields = <br />
"<span style="color: #a31515; font-family: Consolas;"><FieldRefName='ID'/</span><span style="color: #a31515; font-family: Consolas;">><FieldRefName='Title'/</span><span style="color: #a31515; font-family: Consolas;">></span>"; <fieldref name="ID"><fieldref name="’Title'/"></fieldref></fieldref><br />
<br />
5.Limit the specific elements retrieved using CAML:<br />
<br />
<span style="color: blue;">SPQuery</span> query = new <span style="color: blue;">SPQuery</span>();<br />
query.Query = “<where><eq><fieldref name="\”ID\”/"><value type="\”Number\”"><span style="color: #a31515; font-family: Consolas;"><Where</span><span style="color: #a31515; font-family: Consolas;">><Eq</span><span style="color: #a31515; font-family: Consolas;">><FieldRefName=\"ID\"</span><br />
<span style="color: #a31515; font-family: Consolas;">/</span><span style="color: #a31515; font-family: Consolas;">><ValueType=\"Number\"</span><span style="color: #a31515; font-family: Consolas;">></span>15<span style="color: #a31515; font-family: Consolas;"></Value</span><span style="color: #a31515; font-family: Consolas;">></Eq</span><span style="color: #a31515; font-family: Consolas;">></Where</span><span style="color: #a31515; font-family: Consolas;">></span></value></fieldref></eq></where>”;<br />
<br />
6.Query against indexed fields:<br />
<br />
a. Index fields are set at the list or library level (for more information click <a href="http://www.thesanitypoint.com/archive/2009/09/20/indexing-sharepoint-list-columns.aspx">here</a>)<br />
b. Index fields are stored in the Content Database – not in the Search index (for more information click <a href="http://blog.dynatrace.com/2009/01/28/sharepoint-list-performance-how-list-column-indices-really-work-under-the-hood/">here</a>)<br />
c. <span style="color: blue;">SPQuery</span> will only employ the first index field in your query statement <br />
d. Index fields add some overhead to a SharePoint list and therefore should be used judiciously<br />
<br />
7. Use RowLimit and <span style="color: blue;">ListItemCollectionPosition</span> properties to reduce the number of items returned per query by creating a paging effect:<br />
<br />
a. The <span style="color: blue;">SPQuery</span> object provides the property <span style="color: blue;">ListItemCollectionPosition</span> that allows you to specify the start position of your query page. This property can be used for any further page iteration to define the starting point of the next page.<br />
b. The RowLimit property allows you to specify how many items to retrieve per page. <br />
c. Here is a code example that combines these methods:<br />
<br />
<span style="color: blue;">SPQuery</span> query = new <span style="color: blue;">SPQuery</span>();<br />
query.RowLimit = 10; //Page size is set by RowLimit<br />
do{ <br />
<span style="color: blue;">SPListItemCollection</span> items = <span style="color: blue;">SPContext</span>.Current.List.GetItems(query); <br />
<span style="color: #38761d;">//do something with the page result</span> <br />
query.ListItemCollectionPosition = items.ListItemCollectionPosition;}<br />
<span style="color: #38761d;">//the code above sets the position cursor for the next iteration</span> <br />
while (query.ListItemCollectionPosition != null)<br />
<br />
8.List View Threshold and <span style="color: blue;">SPQuery</span> (SharePoint 2010 Only)<br />
<br />
a. SPS 2010 introduces a new capability called <strong>Throttling</strong> which allows a SharePoint Farm Administrator to set a List View Threshold to limit the number of results that can be returned in a user query<br />
b. This same capability will allow SharePoint Farm Administrator to enable and/or disable the developers ability to programmatically override the <strong>List View Threshold</strong> (for more information click <a href="http://malikhan.wordpress.com/2009/12/22/throttling-new-features-of-list-in-sharepoint-2010-part-22/">here</a>)<br />
c. Without an OrderBy clause, a <span style="color: blue;">SPQuery</span> request can be blocked whenever the query is not designed to be restrictive enough to meet the List View Threshold.<br />
d. SharePoint Server 2010 adds a default OrderBy clause that orders by content type, which ensures that folders are returned before list items.<br />
e. Developers should override this behavior with one of custom OrderBy clauses so that their queries can take full advantage of using indexed fields.<br />
f. There are three OrderBy clauses:<br />
i. ContentIterator.ItemEnumerationOrderByID<br />
ii. ContentIterator.ItemEnumerationOrderByPath<br />
iii. ContentIterator.ItemEnumerationOrderByNVPField<br />
g. Why use the ContentIterator.ItemEnumerationOrderByNVPField Property: <br />
i. Using this property overrides any OrderBy clause you may have in your <span style="color: blue;">SPQuery</span> and assures that an indexed field is used for sorting<br />
ii. Using this property keeps your query from being blocked if your where clause is not using indexed fields and would bring back more than the throttling limit (assuming the Farm Administrator has enabled programmatic override of the List View Threshold)<br />
iii. Using this property overcomes the need to store results in memory and/or a temp table for sorting<br />
iv. Here is a code example:<br />
<br />
<span style="color: blue;">StringBuilder</span> camlQuery = new <span style="color: blue;">StringBuilder</span>();<br />
camlQuery.Append<span style="font-family: "Courier New"; font-size: 10pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"<Where>"</span>);</span><where><br />
camlQuery.Append<span style="font-family: "Courier New"; font-size: 10pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"<Eq>"</span>);</span><eq><br />
camlQuery.Append<span style="font-family: "Courier New"; font-size: 10pt;">(<span style="color: #a31515;">"<FieldRef Name='myIndexedField' />"</span>);</span><fieldref name="myIndexedField"><br />
camlQuery.Append<span style="font-family: "Courier New"; font-size: 10pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"<Value Type='Text'>"</span>);</span><value type="Text"><br />
camlQuery.Append<span style="font-family: "Courier New"; font-size: 10pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"{FieldValue}"</span>);</span><br />
camlQuery.Append<span style="font-family: "Courier New"; font-size: 10pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"</Value>"</span>);</span></value><br />
camlQuery.Append<span style="font-family: "Courier New"; font-size: 10pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"</Eq>"</span>);</span></fieldref></eq><br />
camlQuery.Append<span style="font-family: "Courier New"; font-size: 10pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">(<span style="color: #a31515;">"</Where>"</span>);<span style="color: #a31515;"> </span></span></where> <br />
camlQuery.Append(ContentIterator.ItemEnumerationOrderByNVPField);<br />
<br />
<span style="color: blue;">SPQuery</span> query = new SPQuery(); <br />
query.Query = camlQuery.ToString();<br />
ContentIterator oContentIterator = new ContentIterator();<br />
oContentIterator.ProcessItemsInList(query, <span style="color: blue;">delegate</span>(SPListItem item)<br />
{<br />
<span style="color: #38761d;">// Work on each item</span><br />
},<br />
<span style="color: blue;">delegate</span>(<span style="color: blue;">SPListItem</span> item, Exception e)<br />
{<br />
<span style="color: #38761d;">// Handle an exception that was thrown while iterating</span><br />
<span style="color: #38761d;"> // Return true so that ContentIterator rethrows the exception</span><br />
return true;<br />
}<br />
<br />
Writing efficient code is always best practise and since the For Each Loop and SPQuery Object are used so frequently it really pays to learn how to optimize these elements in your custom solution.<br />
<br />
I hope that helps!<br />
<br />
Tom </div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com3tag:blogger.com,1999:blog-3981477210525148311.post-68825555967352912552011-11-03T16:21:00.006-04:002013-06-10T21:47:56.828-04:00Create a For Each Loop for Workflows Using SharePoint Designer 2010<div dir="ltr" style="text-align: left;" trbidi="on">
(The technique described below is for SharePoint 2010, if you are using SharePoint Designer 2007 check out my other post SharePoint Designer Workflows 2 – <a href="http://sharepointgypsy.blogspot.com/2011/01/sharepoint-designer-workflows-2.html">Developing a For Each Loop for Workflows</a> ).<br />
<br />
1. Introduction: Many times when designing workflows there is a need to use a “For Each Loop”. As you may know a For Each Loop will continue to process an action against a list of items until all items in the list have been processed. While present in all programming languages whether declared, script or object oriented, the For Each Loop is not present in SharePoint Designer 2010 workflows, or the other GUI driven workflow tools I know. This article will help you build a For Each Loop for your SharePoint Designer workflow.<br />
<br />
2. Scenario: In our simple scenario we want our workflow to run through each of several items in a list and to update each of the items Boolean “Processed” field from No to Yes (For Each list item update Processed field to Yes).<br />
<br />
3. Explanation: Essentially we will have three workflows, one to create and delete a new item in the “Loop” list, and two others to update the Data list. The logic for the first workflow looks like this:<br />
<br />
a. Create a new item in the Loop 1 list<br />
<br />
b. Pause (allowing the Loop list workflow to run)<br />
<br />
c. Update the current item's Loop count field<br />
<br />
d. Delete the item created in Loop list<br />
<br />
e. Log the actions taken<br />
<br />
The logic for the second workflow looks like this:<br />
<br />
a. Calculate the Loop Count Value<br />
<br />
b. Update the first item whose “Processed” field is set to No<br />
<br />
c. Update the Current Item's Loop Count<br />
<br />
d. Log actions<br />
<br />
e. After 4 Loops Update the item in Loop 2 (thereby starting the third workflow)<br />
<br />
f. Reset the Current Item's Loop Count<br />
<br />
The logic for the third workflow looks like this:<br />
<br />
a. Pause (allowing the Loop 2 list workflow to finish)<br />
<br />
b. Update the first item whose “Processed” field is set to No<br />
<br />
c. Update Current Item Loop Count<br />
<br />
d. Log actions<br />
<br />
4. Overview: To build a For Each Loop we will need three SharePoint Lists, the first list will contain our data, and the other two list will control the For Each Loop. For our example we will call the first list “Data”, the second list “Loop 1” and the third list "Loop 2". We will also need three SharePoint workflows, one, to create and delete items in the For Each Loop list, and two to update items in the Data list. To create the lists follow these steps:<br />
<br />
a. From the SharePoint site create a custom list, call it “Data”<br />
<br />
b. From the Data list add a custom Boolean column, call it “Processed”, set it’s default value to No and add it to the default view<br />
<br />
c. Create 1 custom number field and call it "LoopCount" <br />
<br />
d. From the Data list create 10 to 15 list items (this is sample content for our workflow)<br />
<br />
e. From the SharePoint site create a second custom list, call it “Loop 1”<br />
<br />
f. Create 1 custom number field and call it "LoopCount"<br />
<br />
g. From the Loop 1 list create 1 item, set the title fields value to "For Each Loop 1", and set the LoopCount field's value to "0"<br />
<br />
h. From the SharePoint site create a second custom list, call it “Loop 2”<br />
<br />
i. Create 1 custom number field and call it "LoopCount" <br />
<br />
j. From the Loop 2 list create 1 item, set the title fields value to "For Each Loop 2", and set the LoopCount field's value to "0"<br />
<br />
5. To create the For Each Loop 1 workflow follow these steps:<br />
<br />
a. From SharePoint Designer create a workflow that is associated with the Loop 1 list, call it “For Each Loop 1”<br />
<br />
b. Set this workflow to start automatically when an item is created<br />
<br />
c. Create 1 step for the workflow, call it “For Each Loop”<br />
<br />
d. Create a condition – If Created By is not empty – this means the workflow will always run<br />
<br />
e. Create a second condition – If Current Item LoopCount is less than or equal to 3 – this will ensure the first set of actions runs only for the first 4 loops<br />
<br />
f. Create an action – Calculate Current Item LoopCount plus 1 – this will increment the Loop Counter<br />
<br />
g. Add an Update List Item activity, configure the activity as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIhWQZrOay9Vlt9dH_C1rjwRt5VtoXTrbRkM19ekrPd-P7q-UksFDSZAMOgaUfIfzM6Hiw4iojEnAUFCAoavBFQrQMMrRaxAUoWjXCQJ_8B4U-815HyWQfI3WqqAKewkX2FEzg5ZnOt5M/s1600/1a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIhWQZrOay9Vlt9dH_C1rjwRt5VtoXTrbRkM19ekrPd-P7q-UksFDSZAMOgaUfIfzM6Hiw4iojEnAUFCAoavBFQrQMMrRaxAUoWjXCQJ_8B4U-815HyWQfI3WqqAKewkX2FEzg5ZnOt5M/s320/1a.jpg" width="281" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
h. Add a Update Current Item activity, configure it as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZjRozsK8ZOC3K2upCfpSJL4Ji-IOv7MvhY4LEYiBDp7PE4sMrISyb3f-5QkN08jcEa457ajQJN2-Acwq63SAQwNm3pTfEz1wn18HqPeQ8c7Q0iXIy0SG3V5ukbxqfJTv8nkyEDOLqKkg/s1600/3a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZjRozsK8ZOC3K2upCfpSJL4Ji-IOv7MvhY4LEYiBDp7PE4sMrISyb3f-5QkN08jcEa457ajQJN2-Acwq63SAQwNm3pTfEz1wn18HqPeQ8c7Q0iXIy0SG3V5ukbxqfJTv8nkyEDOLqKkg/s320/3a.jpg" width="252" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
i. Add a Log to History List activity, configure the log to write “For Each Loop – Ran”<br />
<br />
j. Add an Else condition<br />
<br />
k. Add a Pause for 2 minutes – this will ensure the first set of triggered "Data" workflows has completed<br />
<br />
l. Add a Update Item activity, configure it as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2U4vdLWfGHwrt0HFl285_oICmUUffbQ_vnM7bnAEZReTS9X8g72cbsMD1yylzsiQmmCXm7b5Dx1K04z_gucitcMbAH8Bx1mrG9BJswwObQ1myvaK_9VZ3KgolCpdonZFTPNWaGjSoOSw/s1600/4a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2U4vdLWfGHwrt0HFl285_oICmUUffbQ_vnM7bnAEZReTS9X8g72cbsMD1yylzsiQmmCXm7b5Dx1K04z_gucitcMbAH8Bx1mrG9BJswwObQ1myvaK_9VZ3KgolCpdonZFTPNWaGjSoOSw/s320/4a.jpg" width="281" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
m. Add a Update Item activity, configure it to update the original item in the Loop 1 as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6R63s4bDJi1yquNhOaOmydIn51IV4Bxl4YNN7Hw8ICw1EWLlhLFx2qvEZT5FZIzYRair37MY57j9_eh7AqUfPaqvwbzslwonQDUJvODgy9cNdOCUt1fdhsTjM0cqjMtGr8moKmfu_4fE/s1600/5a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6R63s4bDJi1yquNhOaOmydIn51IV4Bxl4YNN7Hw8ICw1EWLlhLFx2qvEZT5FZIzYRair37MY57j9_eh7AqUfPaqvwbzslwonQDUJvODgy9cNdOCUt1fdhsTjM0cqjMtGr8moKmfu_4fE/s320/5a.jpg" width="281" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
n. The complete workflow configuration should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_ocBUxwpqTgGjcJYnpHNIPB6YCb6kZE8lpiuIDw_cMNnn7NJh4LF51uZCrQCMK_w1akEAIcv1kEW11tXdtliiAVF41ZZyhyWboZZsWNwxfYZ77vXIAfBfA_HMDC3ZjYRhKYEYLGBHldw/s1600/6a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="223" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_ocBUxwpqTgGjcJYnpHNIPB6YCb6kZE8lpiuIDw_cMNnn7NJh4LF51uZCrQCMK_w1akEAIcv1kEW11tXdtliiAVF41ZZyhyWboZZsWNwxfYZ77vXIAfBfA_HMDC3ZjYRhKYEYLGBHldw/s320/6a.jpg" width="320" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
6. To create the For Each Loop 2 workflow follow these steps:<br />
<br />
a. From SharePoint Designer create a workflow that is associated with the Loop 2 list, call it “For Each Loop 2”<br />
<br />
b. Set this workflow to start automatically when an item is changed<br />
<br />
c. Create 1 step for the workflow, call it “For Each Loop”<br />
<br />
d. Create a condition – If Created By is not empty – this means the workflow will always run<br />
<br />
e. Add a Pause for 2 minutes – this will ensure the first set of triggered "Data" workflows has completed<br />
<br />
f. Add an Update List Item activity, configure the activity as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZAjWHERODuNplU6DWe-Z4wVpjnQ86jQ8FHRaCVGitpteTY9GQrOJNqdLigm5DqGEXw3wM5xucKQQJX5hm93sxoze1jtKDWYXCKN5EFkcs9iUT8767yBPXZJ7x9Wd3L4zbtIxwqWpUE2A/s1600/7a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZAjWHERODuNplU6DWe-Z4wVpjnQ86jQ8FHRaCVGitpteTY9GQrOJNqdLigm5DqGEXw3wM5xucKQQJX5hm93sxoze1jtKDWYXCKN5EFkcs9iUT8767yBPXZJ7x9Wd3L4zbtIxwqWpUE2A/s320/7a.jpg" width="281" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
g. Add a Update Item activity, configure it to update the original item in the Loop 1 as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5XXDrEX-HwVxMy6PzmBE5r2L24y6k7ebPLcoCV2PVPnzMX-mzOFQnO5YTREufcYeQkYiJlv-NDDfLUrYs-BHyKkkX58K0WZlqWN3u8ju7kIgP3ltslsy9jhXYSuVY86hW2DpoZFonwWk/s1600/8a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5XXDrEX-HwVxMy6PzmBE5r2L24y6k7ebPLcoCV2PVPnzMX-mzOFQnO5YTREufcYeQkYiJlv-NDDfLUrYs-BHyKkkX58K0WZlqWN3u8ju7kIgP3ltslsy9jhXYSuVY86hW2DpoZFonwWk/s320/8a.jpg" width="281" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
h. Add a Log to History List activity, configure the log to write “For Each Loop – Ran”<br />
<br />
i. The complete workflow configuration should appear as below: <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6tXXTeRsMtNc3MuDVAhhufxDkOSgkq1hbOWbTlhjPz07PmGgEN-9o4aNO3JnQmaVwhgjTfH5r0bkjaM96wzWm3Zr6tNtaDfIrmC9BwUJV6Y-hgOFv04Jyzmx6GiLCSA07ipJf4ODHScY/s1600/10a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="124" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6tXXTeRsMtNc3MuDVAhhufxDkOSgkq1hbOWbTlhjPz07PmGgEN-9o4aNO3JnQmaVwhgjTfH5r0bkjaM96wzWm3Zr6tNtaDfIrmC9BwUJV6Y-hgOFv04Jyzmx6GiLCSA07ipJf4ODHScY/s320/10a.jpg" width="320" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
7. To create the Process Data workflow follow these steps:<br />
<br />
a. From SharePoint Designer create a workflow that is associated with the Data list and call it “Process Data”.<br />
<br />
b. Set this workflow to start automatically when a item is changed<br />
<br />
c. Create 1 step for the workflow, call it “Process Data”<br />
<br />
d. Create a condition – If Created By is not empty<br />
<br />
e. Create a second condition and Processed not equals No – this means the workflow will not run if the Processed equals no<br />
<br />
f. Add a Create Item activity, create a new item in the Loop list, title the new item “New Loop Item”, and output to variable “idLoopListItem” of the type list ID, the activity should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZeMzVpSERc7RDvH3NUZs09d-_4hsjhqrdMJUZRMutGTYvNSd2jvRDfVfKh2TrprPuZMcuHQmw6qhhrQbOcqiP7VXqewaH6O11IWoLJC0WY-2SU_lsSPnBtJNfa1-WtVIW3O8qm9jILBQ/s1600/9a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZeMzVpSERc7RDvH3NUZs09d-_4hsjhqrdMJUZRMutGTYvNSd2jvRDfVfKh2TrprPuZMcuHQmw6qhhrQbOcqiP7VXqewaH6O11IWoLJC0WY-2SU_lsSPnBtJNfa1-WtVIW3O8qm9jILBQ/s320/9a.jpg" width="288" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
g. Add a Pause for Duration activity, pause for 1 minute<br />
<br />
h. Add a Update Item activity, update the current item in Data and change the value of Processed to No.<br />
<br />
i. Add a Delete Item activity, and delete the item in the Loop list that has the same id as the idLoopListItem or the item you just created (by deleting the item we will keep this list from growing too large in the future). The configuration should appear as below: <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKXN0F-PDkdREXzgwiT5yTwctcW4XEE7aF1yiCOeCWJhOLC8aXSEAq0AJSA3tia33mlBEA88Z_08_NUoXIeNjR9qEjPQHG5Gz-xYRep5xBv8DFJZf0sF5OI7Ri2yQLOTWIKSZWaFIwd6s/s1600/12a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="302" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKXN0F-PDkdREXzgwiT5yTwctcW4XEE7aF1yiCOeCWJhOLC8aXSEAq0AJSA3tia33mlBEA88Z_08_NUoXIeNjR9qEjPQHG5Gz-xYRep5xBv8DFJZf0sF5OI7Ri2yQLOTWIKSZWaFIwd6s/s320/12a.jpg" width="320" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
j. Add a Log to History List activity, configure the log to write “Processed – Ran”<br />
<br />
k. The complete workflow configuration should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn7wNxOsARlCgyKbS5Cy_FqSlKmOv8ihyDBO7HiQqVtxOB-Q_HadkQCS51g6WPHViXeH6c9fHiQJKyt8Z_npU8rv6a52oa3zQVc-dgqyaeUGIpdYjaL1bFKSbZzW59NLFDPgbq13GHodY/s1600/13a.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="153" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhn7wNxOsARlCgyKbS5Cy_FqSlKmOv8ihyDBO7HiQqVtxOB-Q_HadkQCS51g6WPHViXeH6c9fHiQJKyt8Z_npU8rv6a52oa3zQVc-dgqyaeUGIpdYjaL1bFKSbZzW59NLFDPgbq13GHodY/s320/13a.jpg" width="320" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
8. Test the Workflows: To test the workflow we only need to start the For Each Loop workflow from our item in the Loop 1 List.<br />
<br />
9. Error Messages: The last item created in the Loop list will have an error occurred in the workflow metadata field. This is because the last item to start cannot find any items that have not been processed. This error can be ignored; it’s part of the normal processing and will eventually be deleted by the Process Data workflow.<br />
<br />
10. I want to thank the many folks in the community who used the technique I described in my earlier blog <a href="http://sharepointgypsy.blogspot.com/2011/01/sharepoint-designer-workflows-2.html">SharePoint Designer Workflows 2 – Developing a For Each Loop for Workflows</a><br />
<br />
11. Thanks: I want to acknowledge Ricky Spears for his article “<a href="http://sharepointsolutions.blogspot.com/2008/05/looping-through-items-in-sharepoint.html">Looping through Items in a SharePoint List with SharePoint Designer Workflows</a>”, which provided the technique that I describe in this article.</div>
Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com55tag:blogger.com,1999:blog-3981477210525148311.post-49352482455811010522011-10-26T17:57:00.001-04:002012-10-03T16:43:34.401-04:00Create a State Machine Workflow with SharePoint Designer 2010 - Part 2<div dir="ltr" style="text-align: left;" trbidi="on">
Part 1 of this article is located here:<br />
<a href="http://sharepointgypsy.blogspot.com/2011/10/create-state-machine-workflow-with.html">Create a State-Machine Workflow with SharePoint Designer Part 1</a><br />
<br />
If you have already read part 1 of this article (and you should because part 2 won't make sense without it!) then you should be ready to construct a State-Machine workflow with SharePoint Designer 2010.<br />
<br />
So now let's get to it!!<br />
<br />
Open SharePoint Designer 2010 (SPD10), open your solutions site, and then click on the Workflows icon in the left pane navigation menu. When the workflow tab appears in your design surface from the Quick Access Bar choose Reuseable Workflow. We will create two reuseable Workflows, here is the data you need to fill out the workflow creation form:<br />
<ul>
<li>Workflow 1</li>
<ul>
<li>Name: Review Process Workflow</li>
<li>Description: State-Machine</li>
<li>Content Type: Review Process Library</li>
<li>Statr Options: Manual and On Item Change</li>
</ul>
<li>Workflow 2:</li>
<ul>
<li>Name: Review Task Workflow</li>
<li>Description: State-Machine</li>
<li>Content Type: Review Process Tasks</li>
<li>Start Options: Manual and On Item Change</li>
</ul>
</ul>
Now let's edit the Review Process Workflow. We'll start by creating 4 initiation form parameters to capture the participants of the workflow, th einitiationb paramters will be as follows:<br />
<ul>
<li>Submitter </li>
<li>Compliance Officer </li>
<li>Business Manager </li>
<li>Quality Control </li>
</ul>
Here is the design for the initiation parameters:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6rREJXZl3bzz6E4oa6krxwy1SbSrESYSfg9Mb1amHZz9KKOirlkVT-IdvFSmMUS20Q0iN0p4adWroHPpAKxpUB64_b_jGN-ozYO5Jzh00o6xO8dpNoVxJlf1VA_6z3Kjy9SkFL2AUzj0/s1600/8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6rREJXZl3bzz6E4oa6krxwy1SbSrESYSfg9Mb1amHZz9KKOirlkVT-IdvFSmMUS20Q0iN0p4adWroHPpAKxpUB64_b_jGN-ozYO5Jzh00o6xO8dpNoVxJlf1VA_6z3Kjy9SkFL2AUzj0/s400/8.jpg" width="400" /></a></div>
<br />
<br />
Create 5 Steps for this workflow, here are the step names:<br />
<ul style="text-align: left;">
<li>Initialize</li>
<li>Submitter </li>
<li>Compliance Officer </li>
<li>Business Manager </li>
<li>Quality Control </li>
</ul>
Here is the design for Step 1, essentially, on the First Run only, we are updating the Review Process States and Review Process Roles metadata in the Review Process Library and then creating a new task in Review Process Task:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz2eBrdiZUyRAff8EomCsmm-1p1Zkp2u4fbuKV9bT11DYT4MEoBGPqVICq9Oox3WnMPZ5cVOEl_a-u9ZUiU68Ik-nFM68y8H0Xq1lDObNytpXp4AkpWZkbHT7pywGzFo7IPVBNQRZanRw/s1600/9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz2eBrdiZUyRAff8EomCsmm-1p1Zkp2u4fbuKV9bT11DYT4MEoBGPqVICq9Oox3WnMPZ5cVOEl_a-u9ZUiU68Ik-nFM68y8H0Xq1lDObNytpXp4AkpWZkbHT7pywGzFo7IPVBNQRZanRw/s400/9.jpg" width="400" /></a></div>
<br />
<br />
Here is the design for Step 2. In this step we establish our normal State-Machine Workflow pattern, which is as follows:<br />
<ul style="text-align: left;">
<li>Check Three Conditions:</li>
<ul>
<li>Task Status</li>
<li>Review Process Role</li>
<li>Review Process States</li>
</ul>
<li>Create a new task item in the Review Process Task list with these values:</li>
<ul>
<li><div>
Content Type ID</div>
</li>
<li><div>
Title</div>
</li>
<li><div>
Review Process Role</div>
</li>
<li><div>
Review Process States</div>
</li>
<li><div>
Description</div>
</li>
<li><div>
Workflow ID</div>
</li>
<li><div>
Assign To</div>
</li>
</ul>
<li><div>
Create a Log entry to record the action</div>
</li>
<li><div>
Write a Log if no conditions are met for that step</div>
</li>
<div>
</div>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidxJwMzKSjzatQaGDiXJ-ErXSRf3Meb3AFVbO5YKT80AYVOa9saACgQHvEzMmjoUV43BkJ-6pPymYB4sB1w7HQF4ISR1j-phQt2SsPraTmD5p_fa1u22PM0JZOyNr3eDquwvQUSltFV-k/s1600/10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="253" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidxJwMzKSjzatQaGDiXJ-ErXSRf3Meb3AFVbO5YKT80AYVOa9saACgQHvEzMmjoUV43BkJ-6pPymYB4sB1w7HQF4ISR1j-phQt2SsPraTmD5p_fa1u22PM0JZOyNr3eDquwvQUSltFV-k/s400/10.jpg" width="400" /></a></div>
<br />
Some of the finer points: <br />
<ul>
<li>Make sure the role is for the person <strong><em>Receiving</em></strong> the task</li>
<li>Use the Current Item ID as the Workflow ID</li>
<li>Use the Workflow Initiation Form parameters to assign the task to a participant </li>
</ul>
<br />
Here is the design for Step 3. This step, and all the additional steps, will follow the same pattern as step 2.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQqSw-3Pm_kmCckebSd3GjbjxZG8qcgIfEfFKvUYY7NOOwxLJLTCw7u_3uDq_cIxt_vhwui8GoyuCY2LQa6Gxi_n39Tg8re8GjqsHqp9CVXB0mfRma7E8XeXwCwYcmmzQTGX63diHJU58/s1600/11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="253" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQqSw-3Pm_kmCckebSd3GjbjxZG8qcgIfEfFKvUYY7NOOwxLJLTCw7u_3uDq_cIxt_vhwui8GoyuCY2LQa6Gxi_n39Tg8re8GjqsHqp9CVXB0mfRma7E8XeXwCwYcmmzQTGX63diHJU58/s400/11.jpg" width="400" /></a></div>
<br />
Here is the design for Step 4. This step will follow the same pattern as step 2.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhajWLylbA1kb47QCzcaOJyMEhLhhcQAjFNzXV9JIA7i_GA5Wc6INJ8R72FMwkFM8AUG7o0oB7zljoUf2-YYNVSCeiY3JhhG2_K0Cp3urytK0MwRx50UiGWWZEqlyPl0CX131SgN9MBRAI/s1600/12.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="253" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhajWLylbA1kb47QCzcaOJyMEhLhhcQAjFNzXV9JIA7i_GA5Wc6INJ8R72FMwkFM8AUG7o0oB7zljoUf2-YYNVSCeiY3JhhG2_K0Cp3urytK0MwRx50UiGWWZEqlyPl0CX131SgN9MBRAI/s400/12.jpg" width="400" /></a></div>
<br />
Here is the design for Step 5. This step will follow the same pattern as step 2.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKn1cwpCMXENvl1XDAc4MqzhO7pZLybu5VXaXDfRIP-4-IrjIX9ZxajxufZ0LCcOn86ARvFdMfcloIrV8wkyy_BzufC0KPBfncTnEWOko8bWfRvjWsIXbENoaM93XmsDPxkDZf5Uv-axQ/s1600/13.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKn1cwpCMXENvl1XDAc4MqzhO7pZLybu5VXaXDfRIP-4-IrjIX9ZxajxufZ0LCcOn86ARvFdMfcloIrV8wkyy_BzufC0KPBfncTnEWOko8bWfRvjWsIXbENoaM93XmsDPxkDZf5Uv-axQ/s400/13.jpg" width="400" /></a></div>
<br />
Once you have all these steps configured then save, publish, and deploy your workflow to the Task Process List.<br />
<br />
Now for our Review Task Workflow. This is also a very simple workflow, it's purpose is just to modify the three metadata values of the document in the Review Process Library. By modifying these values the Review Task Workflow does two things - changes the State and starts the Review Process Library workflow (which will then create a new task based on the changed state).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha9RGSvZrdoNGpD_sKnvC6p4U1gEIAa6WyoKqf00XFmIQr7EtKlIMQTCqgQQh4Op3jew0P3EDD5eWEFsuRYLTCKZnMYqjhDZ6SIN8xa8zV51FXZT3y1vy90qrkzi4vVuhhCNxL1wX3Sqw/s1600/14.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="368" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEha9RGSvZrdoNGpD_sKnvC6p4U1gEIAa6WyoKqf00XFmIQr7EtKlIMQTCqgQQh4Op3jew0P3EDD5eWEFsuRYLTCKZnMYqjhDZ6SIN8xa8zV51FXZT3y1vy90qrkzi4vVuhhCNxL1wX3Sqw/s400/14.jpg" width="400" /></a></div>
<br />
Once you have all this step configured then save, publish, and deploy your workflow to the Review Task Library.<br />
<br />
So by now you may be asking, "How does all this work?" Let's go through a scenario to help explain:<br />
<ol style="text-align: left;">
<li>Joe User uploads a document to the Review Process Library</li>
<li>Joe wants his document to be reviewed so he manually begins the Review Process Workflow</li>
<li>The Initian Form of the Review Process Workflow prompts Joe User for the account information of the four Role Based Participants involved in the workflow</li>
<li>Joe provides the acocount information and then clicks the Start button, this starts the Review Process Workflow</li>
<li>On the First Run the Review Process Workflow initializes values and then creates an initial Submitter Task in the Review Task List</li>
<li>The Submitter receives notification that he/she has a new review task</li>
<li>The Submitter reviews the task and chooses to change the state by modifiying the Review Process State value and then clicks OK</li>
<li>The Review Task Workflow modifies the state based metadata values of the document in the Task Process Library</li>
<li>Based on the new metadata values the Review Process Workflow creates a new task in the Review Task List</li>
<li>Another participant receives notification that he/she has a new review task</li>
<li>This participant reviews the task and chooses to change the state by modifiying the Review Process State value and then clicks OK</li>
<li>Steps 8 through 11 continue to repeat until the Review Process Workflow is completed</li>
</ol>
<br />
I hope that helps!<br />
<br />
Tom</div>
Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com7tag:blogger.com,1999:blog-3981477210525148311.post-70457583209975063262011-10-24T20:31:00.016-04:002012-10-03T16:45:20.706-04:00Create a State Machine Workflow with SharePoint Designer 2010 - Part 1<div dir="ltr" style="text-align: left;" trbidi="on">
<div closure_uid_88c33u="146">
Part 1 of this article is located here:<br />
<a href="http://sharepointgypsy.blogspot.com/2011/10/create-state-machine-workflow-with_26.html">Create a State Machine Workflow with SharePoint Designer 2010 - Part 2</a><br />
<br />
<br />
If you work with SharePoint Designer on a regular basis then you have probably built SharePoint Designer Sequential Workflows, and if you have built SharePoint Designer Sequential Workflows then you have probably been asked the question - "Can you build State Machine Workflows with SharePoint Designer?" Well despite what you may have heard or been told the answer to that question is a definite "YES!" and this blog will show you just how that can be done. <br />
<br />
To start with let's talk about the differences between a Sequential Workflow and a State Machine Workflow. There are many good definitions for both types of workflows but one of the best explanantion I have read is the one provided by Stephanie Grima in her blog "[<a href="http://geekswithblogs.net/stephaniegrima/archive/2008/10/31/sharepoint-state-machine-workflow-vs.-sequential-workflow.aspx">SharePoint] State Machine Workflow vs. Sequential Workflow</a> (I have paraphrased her statements):"</div>
<br />
<div closure_uid_88c33u="146">
<strong> State-Machine workflows:</strong><br />
<br /></div>
<div closure_uid_88c33u="146">
1. State-machine workflows are workflows which are driven by particular state based events, for example: </div>
<ul style="text-align: left;">
<li><div closure_uid_88c33u="292">
Approved by Submitter</div>
</li>
<li closure_uid_88c33u="299">Rejected by Compliance Officer</li>
<li closure_uid_88c33u="300">Delegated by Business Manager</li>
<li closure_uid_88c33u="306">Paused by Quality Control</li>
</ul>
<div closure_uid_88c33u="306" style="text-align: left;">
2. Until the workflow state changes, the workflow will not execute another action.</div>
<div closure_uid_88c33u="307">
</div>
<div closure_uid_88c33u="309">
3. The "path" of the workflow is dynamic and based what events the user executes.</div>
<div closure_uid_88c33u="310">
4. The workflow does not need to end, but instead can continue to execute based on changes in state.<br />
<br /></div>
<div closure_uid_88c33u="311">
<strong>Sequential workflows:</strong><br />
<br /></div>
<div closure_uid_88c33u="321">
1. Sequential workflows are very static, they work like a flowchart, for example: </div>
<div closure_uid_88c33u="321">
<ul>
<li>Complete Step A</li>
<li>Complete Step B</li>
<li>Complete Step C</li>
</ul>
</div>
<div closure_uid_88c33u="313">
2. Sequential workflows are useful when there is pre-determined sequence of events required to complete the task.</div>
3. The"path" of the workflow is rigid and based on what sequential actions are defined by the developer.<br />
<br />
<div closure_uid_88c33u="146">
To put it succinctly, State Machine Workflows <em>can take any path</em> based on process state, Sequential Workflows <em>can only take one path</em> based on process flow.</div>
<div closure_uid_88c33u="146">
<br /></div>
<div closure_uid_88c33u="146">
So, now that we understand the theory let's put it into practice by creating a State Machine Workflow in SharePoint Designer (SPD) 2010.</div>
<div closure_uid_88c33u="146">
<br /></div>
<div closure_uid_88c33u="146">
Our Review Process Roles are as follows: </div>
<ul style="text-align: left;">
<li>Submitter </li>
<li>Compliance Officer </li>
<li>Business Manager </li>
<li>Quality Control </li>
</ul>
<div closure_uid_88c33u="146">
Our Review Process States are as follows:<br />
<ul style="text-align: left;">
<li>Policy Review Started</li>
<li>Policy Review Ready for Compliance Officer Review</li>
<li>Policy Review Returned for Correction to Submitter</li>
<li>Policy Review Ready for Business Manager Review</li>
<li>Policy Review Returned for Correction to Compliance Officer</li>
<li>Policy Review Ready for Quality Control Review </li>
<li>Policy Review Returned for Correction to Business Manager </li>
<li>Policy Review Completed</li>
</ul>
</div>
<div closure_uid_88c33u="146">
<br />
The Compliance Officer, Business Manager or Quality Control can approve or reject the policy, and if they do they can return it back to any step in the process. It is also true that the Submitter, Compliance Officer and Business Manager can approve the policy, and if they do they can move it ahead to any step in the process. Here is our simple process diagram:</div>
<div closure_uid_88c33u="146">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh98ZnKhIVLV6FzWNFbSJm8qB8cS2QtmQtCMVFBQyiPkkIOtqFl227jjM6vw8AcJSzHl_6ldAQQ5CJ1KpQy-Ycjf3rEqARPoXQmU_-0RdJ1klvKeTrzuBrjcgFKSUKNVjOcDJRrUU0CzwU/s1600/1.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="62" nba="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh98ZnKhIVLV6FzWNFbSJm8qB8cS2QtmQtCMVFBQyiPkkIOtqFl227jjM6vw8AcJSzHl_6ldAQQ5CJ1KpQy-Ycjf3rEqARPoXQmU_-0RdJ1klvKeTrzuBrjcgFKSUKNVjOcDJRrUU0CzwU/s400/1.bmp" width="400" /></a></div>
<div closure_uid_88c33u="146">
<br /></div>
<div closure_uid_88c33u="146">
<div style="text-align: left;">
OK, now for the basic structure of our SPD 2010 workflow solution. Essentially the solution consists of two workflows, the Review Process Workflow and the Review Process Task Workflow. As their names imply the Review Process Workflow manages the main review process, and the Review Process Task Workflow task the workflow participants. The interaction of these two workflows can be represented as shown below:</div>
</div>
<div closure_uid_88c33u="146">
</div>
<div class="separator" closure_uid_88c33u="146" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfEkTnOHh08zJLrN88jHGJ0F8qMnaN4AnScI824LeG0HDLRXlWXYM2pXYEegHz_dALgdmIDp5G2RCTElSARTNMQI8TrHxRqG9VSAFqjV9J3LBgLyn3PPk3rAE_zhJoJdP7CYmBewg6SrI/s1600/2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="86" nba="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfEkTnOHh08zJLrN88jHGJ0F8qMnaN4AnScI824LeG0HDLRXlWXYM2pXYEegHz_dALgdmIDp5G2RCTElSARTNMQI8TrHxRqG9VSAFqjV9J3LBgLyn3PPk3rAE_zhJoJdP7CYmBewg6SrI/s200/2.bmp" width="200" /></a></div>
<br />
So let's start building our State Machine Workflow. Our build starts with Content Types at the Site Collection Level - Review Process Task and Review Process Library. Here is the structure of the Review Process Task Content Type:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHXTsPX413113WhsHBqs-pEAV19yh8X9nGOuFIawuYaKrSezTAHbai-aP9fQ84j3Q_cjJU-ZPnRjEDZD_w_pLjGUq-v4XD3lzSMTRdh55LDeSFwxroj8KzTEuD1mxd29w3M79c27ZEbuA/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="161" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHXTsPX413113WhsHBqs-pEAV19yh8X9nGOuFIawuYaKrSezTAHbai-aP9fQ84j3Q_cjJU-ZPnRjEDZD_w_pLjGUq-v4XD3lzSMTRdh55LDeSFwxroj8KzTEuD1mxd29w3M79c27ZEbuA/s400/1.jpg" width="400" /></a></div>
<br />
<br />
The one additional modification we will need to make is to change the items in the choice list for the Task Status field. Delete all the existing choices and simply add two choices - "Approve" and "Reject", and make sure there is no default choice configured.<br />
<br />
And here is the structure of the Review Process Library Content Type:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeqziB-KWs_PeswQN2Sh72Yygc1Mtbm0xQRxSvx4h8pf4ONOc0dGqvvUd0u_beeKx0UrLAggVKn49Tdf7oDXdWpR8PZ1O_fkir532O76Rv2IEtU_P22MqhuDWuM4PzvtWJIHHDBysbSjo/s1600/7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="105" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeqziB-KWs_PeswQN2Sh72Yygc1Mtbm0xQRxSvx4h8pf4ONOc0dGqvvUd0u_beeKx0UrLAggVKn49Tdf7oDXdWpR8PZ1O_fkir532O76Rv2IEtU_P22MqhuDWuM4PzvtWJIHHDBysbSjo/s400/7.jpg" width="400" /></a></div>
<br />
<br />
Again, the one additional modification we will need to make is to change the items in the choice list for the Task Status field. Delete all the existing choices and simply add two choices - "Approve" and "Reject", and make sure there is no default choice configured.<br />
<br />
Notice that both content types make use of three custom content coulmns Rerview Process Roles, Review Process States, and Workflow ID. Here is the structure of Review Process Roles choice column:<br />
<ul style="text-align: left;">
<li>Submitter</li>
<li>Compliance Officer</li>
<li>Business Manager</li>
<li>Quality Control</li>
</ul>
<div>
And here is the structure of the Review Process States choice column:</div>
<ul style="text-align: left;">
<li>Policy Review Started</li>
<li>Policy Review Ready for Compliance Officer Review</li>
<li>Policy Review Returned for Correction to Submitter</li>
<li>Policy Review Ready for Business Manager Review</li>
<li>Policy Review Returned for Correction to Compliance Officer</li>
<li>Policy Review Ready for Quality Control Review </li>
<li>Policy Review Returned for Correction to Business Manager </li>
<li>Policy Review Completed</li>
</ul>
<div>
The Workflow ID column is just a simple number column set to have 0 decimal places.</div>
<div>
</div>
<div>
Next we need to create the Review Process Library as a document library and the Review Process Task as a task list. Once these are created replace the default Content Types with our custom Content Types. This will make the default Content Type for the Review Process Library the Review Process Library Content Type and the default Content Type for the Review Process Task list the Review Process Task Content Type. </div>
<br />
OK, now for the good part, we need to make two reuseable workflows - Review Process Workflow and Review Task Workflow. As you may have guessed, the Review Process Workflow will use the Review Process Library Content Type, and the Review Task Workflow will use the Review Process Task Content Type. (To see how to create reuseable workflows in SHarePoint Designer click <a href="http://www.microsoft.com/resources/msdn/en-us/office/media/video/sharepointestc.html?uuid=63790e4e-3a9e-4723-ba2c-0e30dfede093&from=mscomsharepoint">here</a>).<br />
<br />
The psuedo logic for the Review Process Workflow is as follows:<br />
<ul style="text-align: left;">
<li>Submitter</li>
<ul>
<li>State = Policy Review Started</li>
<li><strong>Or</strong> If Approve and Sate = Policy Review Ready for Compliance Officer Review</li>
<li><strong>Or</strong> If Approve and State = Policy Review Ready for Business Manager Review</li>
<li><strong>Or</strong> If Approve and State = Policy Review Ready for Quality Control Review</li>
<li>Then Create New Task</li>
</ul>
<li>Compliance Officer</li>
<ul>
<li>If Reject and Sate = Policy Review Returned for Correction to Submitter</li>
<li><strong>Or</strong> If Approve and Sate = Policy Review Ready for Business Manager Review</li>
<li><strong>Or</strong> If Approve and Sate = Policy Review Ready for Quality Control Review</li>
<li>Then Create New Task</li>
</ul>
<li>Business Manager</li>
<ul>
<li>If Reject and Sate = Policy Review Returned for Correction to Submitter </li>
<li><strong>Or </strong>If Reject and Sate = Policy Review Returned for Correction to Compliance Officer</li>
<li>If Approve and Sate = Policy Review Ready for Quality Control Review</li>
<li>Then Create New Task</li>
</ul>
<li>Quality Control</li>
<ul>
<li>State = Policy Review Completed</li>
<li><strong>Or</strong> If Reject and Sate = Policy Review Returned for Correction to Submitter </li>
<li><strong>Or </strong>If Reject and Sate = Policy Review Returned for Correction to Compliance Officer</li>
<li><strong>Or </strong>If Reject and Sate = Policy Review Returned for Correction to Business Manager</li>
<li>Then Create New Task</li>
</ul>
</ul>
The psuedo logic for the Review Task Workflow is as follows:<br />
<ul>
<li>If State has Changed then Update Review Process Library</li>
<li>Else Log "No Change"</li>
</ul>
From the psuedo logic we can see that the Review Process Workflow contains the logic to capture all the possible states and then creates the appropriate task for the appropriate role based on that state. On the other hand the Review Task Workflow simply updates the Review Process Library with the current state based on the outcome of the task.<br />
<br />
Now let's build our State-Machine Workflow!!! I'll cover the steps for construction in my next article - Create a State Machine Workflow with SharePoint Designer 2010 - Part 2 (Coming Soon!!!).<br />
<br />
<br />
<br />
<div closure_uid_88c33u="146">
References: </div>
<div closure_uid_88c33u="146">
<br />
<div>
</div>
</div>
<div closure_uid_88c33u="146">
<a closure_uid_88c33u="187" href="http://coredotnet.blogspot.com/2008/03/creating-state-machine-workflows-using.html">Creating State Machine Workflows using SharePoint Designer 2007</a></div>
<div closure_uid_88c33u="146">
<a href="http://coredotnet.blogspot.com/2008/04/creating-state-machine-workflows-using.html">Creating State Machine Workflows using SharePoint Designer 2007: Addendum</a></div>
<div closure_uid_88c33u="146">
<a href="http://paulgalvinsoldblog.wordpress.com/2008/05/14/mea-culpa-sharepoint-designer-can-create-state-machine-workflows/">Mea Culpa — SharePoint Designer *CAN* Create State Machine Workflows</a></div>
<br />
<div>
</div>
<br />
<div>
</div>
<div>
</div>
<br />
<div>
</div>
<br />
<div>
</div>
<div>
</div>
</div>
Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-51804335646520865252011-09-13T18:49:00.002-04:002012-03-26T16:27:30.770-04:00SharePoint 2010 - Third Party Tools Evaluation Process - Part 1<div dir="ltr" style="text-align: left;" trbidi="on">
As a SharePoint Architect I am often called upon to evaluate third party SharePoint tools for my customers. Some of these tools are as simple as a list roll-up web part and others are as complex as an entire suite for backup and recovery of the SharePoint environment. Without proper guidance and a well defined logical process this kind of task can be a very difficult, uncertain and highly subjective. Even worse, choosing the wrong tool can be costly and have a negative impact on your customer's confidence in SharePoint.<br />
<br />
For that reason I have developed a <strong>Third Party Tools Evaluation Process</strong> that helps guide my customer and I through the evaluation of tools for SharePoint, and in this two (or three?) part blog I will discuss how that process works so that you the SharePoint Architect can properly lead your customer.<br />
<br />
The key artifacts of this process are the process outline itself and the Decision Support Matrix (more about this later). The key deliverables are the decision Support Matrix (there's that word again) and the Support Document (which can follow whatever format the customer normally requires).<br />
OK, to start with, here is the overall process, and as you can see, it is characterized by six phases (marked with Arabic numerals) and three review gates (marked by Roman numerals):<br />
<br />
Phase 1. Requirements Definition – Decision Support Matrix – Define the Need<br />
<br />
o Problem Statement – What business problem creates the need for this tool?<br />
<br />
o Use Case Scenarios <br />
<br />
Format: Actor – Action – Entity<br />
<br />
Define the steps the user will take in using the tool<br />
<br />
Becomes the basis of Test Plans in Analysis/ Research Phase<br />
<br />
• Example 1: The site admin adds the web part to a page’s web part zone<br />
<br />
• Example 2: The automated workflow updates the list metadata<br />
<br />
o What’s the Total Cost of Ownership as Compared to an In-House Solution?<br />
<br />
What’s the Total Cost of Ownership (TCOO) for the Tool? <br />
<br />
o Purchase cost year one<br />
<br />
o Yearly maintenance cost<br />
<br />
o Period of five years <br />
<br />
TCOO for the In House Development? <br />
<br />
o Number of hours spent in initial Software Development Life Cycle year one<br />
<br />
o Employee cost per hour<br />
<br />
o Number of hours spent in subsequent (updates/fixes) over the life cycle<br />
<br />
o Period of five years<br />
<br />
Comparison = TCOO Tool – TCOO Development<br />
<br />
Phase 2. Analysis / Research – Decision Support Matrix – Access the Potential Solution Choices<br />
<br />
o Perform a Vendor Assessment<br />
<br />
Gartner Reviews<br />
<br />
• What is the Vendor’s Market Place Stability<br />
<br />
• Marketplace Acceptance<br />
<br />
• Sales Model<br />
<br />
• Customer References<br />
<br />
• Product Support<br />
<br />
• Product Training<br />
<br />
o Receive vendor led product demonstrations<br />
<br />
o Establish absolute pricing boundaries <br />
<br />
o Determine minimum infrastructure required to use the tool<br />
<br />
o Ensure early stakeholder involvement<br />
<br />
Finance<br />
<br />
Management <br />
<br />
Business Analysts<br />
<br />
System Engineers/Architects<br />
<br />
Information Security Engineers/Architects<br />
<br />
Software Engineers/Architects<br />
<br />
Business Users<br />
<br />
Support / Help Desk<br />
<br />
o Decision Support Matrix - Draft<br />
<br />
Selection Criteria – Pass/Fail<br />
<br />
Evaluation Criteria – Compare<br />
<br />
Weighting – Importance<br />
<br />
Each Stakeholder Provides a Draft Evaluation<br />
<br />
o Maintenance Assessment<br />
<br />
Third Party Vendor <br />
<br />
• Availability<br />
<br />
• Cost<br />
<br />
• Value<br />
<br />
Level of Demand for Internal Resource Support<br />
<br />
<strong>Review Gate I – Requirements and Analysis / Research</strong><br />
<br />
Phase 3. Evaluation – Decision Support Matrix – Evaluate the Potential Solution Choices<br />
o Environments<br />
<br />
Development <br />
<br />
Test<br />
<br />
Staging<br />
<br />
o Testing<br />
<br />
Test Strategy<br />
<br />
Test Plan – Derived from Use Cases<br />
<br />
Test Report<br />
<br />
o Product Assessment<br />
<br />
Finance<br />
<br />
IT Management <br />
<br />
Business Analysts<br />
<br />
System Engineers/Architects<br />
<br />
Information Security Engineers/Architects<br />
<br />
Software Engineers/Architects<br />
<br />
Business Users<br />
<br />
Support / Help Desk<br />
<br />
o Technical Documentation<br />
<br />
Tool Deployment/Retraction<br />
<br />
Tool Configuration<br />
<br />
Tool Use<br />
<br />
Phase 4. Selection – Decision Support Matrix – Choose the Solution<br />
<br />
o Decision Support Matrix - Final<br />
<br />
Selection Criteria – Pass/Fail<br />
<br />
Evaluation Criteria – Compare<br />
<br />
Weighting – Importance<br />
<br />
Each Stakeholder Provides a Final Evaluation<br />
<br />
o Evaluation Review Meeting<br />
<br />
Key Stakeholders<br />
<br />
Evaluation Team<br />
<br />
Evaluation Documentation<br />
<br />
• Requirements Document<br />
<br />
• Decision Support matrix<br />
<br />
• Technical Documentation<br />
<br />
<strong>Review Gate II – Evaluation and Selection</strong><br />
<br />
Phase 5. Deployment – Support Documentation – Deploy the Solution<br />
<br />
o Production Environment<br />
<br />
o Tool Deployment Scheduling<br />
<br />
o Engineer/Power User/User Training<br />
<br />
o Communication/Announcement<br />
<br />
<strong>Review Gate III – Deployment and Maintenance</strong><br />
<br />
Phase 6. Maintenance – Support Documentation – Maintain the Solution<br />
<br />
o Updates/Patches<br />
<br />
o Trouble Tickets<br />
<br />
Vendor<br />
<br />
Internal<br />
<br />
o Migration<br />
<br />
<br />
In my next blog I'll explain this process as well as introduce the all important Decision Support Matrix.<br />
<br />
I hope that helps!<br />
<br />
Tom</div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-24675643232818239462011-08-01T16:52:00.000-04:002012-03-26T16:26:25.785-04:00MOSS 2007 to SharePoint 2010 Migration - Lessons Learned<div dir="ltr" style="text-align: left;" trbidi="on">
<div closure_uid_5vfdb8="137">
I recently completed a migration from MOSS 2007 to Sharepoint 2010 and I encountered many application migration issues that I had to find a way to resolve. As a result I learned a lot of lessons that I wanted to share with others who may be facing the same challenge - I hope this may save you some time and effort.</div>
<div closure_uid_6bayw="158">
<br /></div>
<div closure_uid_6bayw="158">
<strong><u>1. Search:</u></strong></div>
<br />
<div closure_uid_6bayw="160">
<strong>a. Issue:</strong> Search center web parts fail to load; search bar is missing</div>
<br />
<div closure_uid_6bayw="161">
<strong>b. Fix:</strong> Reconfigure and redeploy search master page</div>
<br />
<div closure_uid_6bayw="162">
<strong>c. Reference:</strong> </div>
<div closure_uid_6bayw="162">
<br /></div>
<div closure_uid_6bayw="162">
1.<a href="http://blog.drisgill.com/2010/09/converting-custom-sharepoint-2010.html">http://blog.drisgill.com/2010/09/converting-custom-sharepoint-2010.html</a></div>
<br />
<div closure_uid_6bayw="163">
2.<a href="http://sharepointfoundation2010.blogspot.com/2010/08/customize-search-results-in-sharepoint.html">http://sharepointfoundation2010.blogspot.com/2010/08/customize-search-results-in-sharepoint.html</a></div>
<div closure_uid_6bayw="163">
<br /></div>
<br />
<div closure_uid_6bayw="164">
<strong>a. Issue:</strong> Advanced Search page broken</div>
<br />
<div closure_uid_6bayw="165">
<strong>b. Fix:</strong> Reconfigure and redeploy search master page and results page</div>
<br />
<div closure_uid_6bayw="166">
<strong>c. Reference: </strong></div>
<br />
<div closure_uid_6bayw="322">
1.<a href="http://blog.drisgill.com/2010/09/converting-custom-sharepoint-2010.html">http://blog.drisgill.com/2010/09/converting-custom-sharepoint-2010.html</a></div>
<br />
<div closure_uid_6bayw="326">
2.<a href="http://sharepointfoundation2010.blogspot.com/2010/08/customize-search-results-in-sharepoint.html">http://sharepointfoundation2010.blogspot.com/2010/08/customize-search-results-in-sharepoint.html</a></div>
<br />
<br />
<div closure_uid_6bayw="173">
<strong>a. Issue:</strong> Cannot search scopes </div>
<br />
<div closure_uid_6bayw="175">
<strong>b. Fix:</strong> Ensure that the default search results page is the search center results.aspx page. Apply custom search master page and configure results.aspx with web parts. Remove scopes that do not exist by modifying the Scopes list on the Search Center site. </div>
<br />
<div closure_uid_6bayw="176">
<strong>a. Reference:</strong> </div>
<div closure_uid_6bayw="176">
<br /></div>
<div closure_uid_6bayw="176">
1. <a href="http://blog.drisgill.com/2010/09/converting-custom-sharepoint-2010.html">http://blog.drisgill.com/2010/09/converting-custom-sharepoint-2010.html</a></div>
<br />
<div closure_uid_6bayw="333">
2. <a href="http://technet.microsoft.com/en-us/library/ee792872.aspx">http://technet.microsoft.com/en-us/library/ee792872.aspx</a></div>
<div closure_uid_6bayw="177">
<br /></div>
<br />
<div closure_uid_6bayw="178">
<strong>a. Issue:</strong> The initial page opens in the test environment, but the subsequent pages open in the production environment</div>
<br />
<div closure_uid_6bayw="179">
<strong>b. Fix:</strong> Change results page absolute URL to relative path URL </div>
<br />
<div closure_uid_6bayw="180">
<strong>c. Reference:</strong> <a href="http://amitkumarmca04.blogspot.com/2011/04/how-to-convert-absolute-url-to-relative.html">http://amitkumarmca04.blogspot.com/2011/04/how-to-convert-absolute-url-to-relative.html</a></div>
<br />
<br />
<div closure_uid_6bayw="181">
<strong>a. Issue:</strong> Results by Relevance option does not display and Time to complete does not display</div>
<br />
<div closure_uid_6bayw="182">
<strong>b. Fix:</strong> Reconfigure results page in SPS 2010 (Results Relevance are handled differently in SPS 2010 - see below article in Reference). </div>
<br />
<div closure_uid_6bayw="183">
<strong>c. Reference:</strong> <a href="http://www.sharepointanalysthq.com/2010/06/sharepoint-2010-search-refinement-panel-options/">http://www.sharepointanalysthq.com/2010/06/sharepoint-2010-search-refinement-panel-options/</a></div>
<div closure_uid_6bayw="303">
<br /></div>
<div closure_uid_6bayw="303">
<br /></div>
<div closure_uid_6bayw="184">
<strong>a. Issue:</strong> Receive error/blank page when trying to access Search Center</div>
<br />
<div closure_uid_6bayw="185">
<strong>b. Fix:</strong> Reconfigure the site to use the new default and custom master page</div>
<br />
<div closure_uid_6bayw="186">
<strong>c. Reference:</strong> <a href="http://geekswithblogs.net/mbridge/archive/2010/10/03/sharepoint-2010-hosting--deploying-a-custom-master-page-in.aspx">http://geekswithblogs.net/mbridge/archive/2010/10/03/sharepoint-2010-hosting--deploying-a-custom-master-page-in.aspx</a></div>
<div closure_uid_6bayw="186">
<br /></div>
<br />
<div closure_uid_6bayw="194">
<strong>a. Issue:</strong> Pages are broken when trying to search in ‘All Sites’ and ‘People’</div>
<br />
<div closure_uid_6bayw="197">
<strong>b. Fix:</strong> Change searched settings to show and default to contextual scope so people/all sites could be searched. Ensure that the default search results page is the search center results.aspx page. Apply custom search master page and configure results.aspx with web parts. Remove scopes that do not exist by modifying the Scopes list on the Search Center site. </div>
<br />
<div closure_uid_6bayw="198">
<strong>c. Reference:</strong> </div>
<div closure_uid_6bayw="198">
<br /></div>
<div closure_uid_6bayw="198">
1. <a href="http://blog.drisgill.com/2010/09/converting-custom-sharepoint-2010.html">http://blog.drisgill.com/2010/09/converting-custom-sharepoint-2010.html</a></div>
<br />
<div closure_uid_6bayw="359">
2. <a href="http://technet.microsoft.com/en-us/library/ee792872.aspx">http://technet.microsoft.com/en-us/library/ee792872.aspx</a></div>
<div closure_uid_6bayw="358">
<br /></div>
<div closure_uid_6bayw="199">
<br /></div>
<div closure_uid_6bayw="203">
<strong><u>2. Ribbon:</u></strong></div>
<br />
<div closure_uid_6bayw="204">
<strong>a. Issue:</strong> Ribbon is not displayed </div>
<br />
<div closure_uid_6bayw="205">
<strong>b. Fix:</strong> Check out page, edit it, check in page</div>
<br />
<div closure_uid_6bayw="206">
<strong>c. Reference:</strong> N/A</div>
<div closure_uid_6bayw="206">
<br /></div>
<div closure_uid_6bayw="206">
<br /></div>
<div closure_uid_6bayw="207">
<strong>a. Issue:</strong> Navigate Up in the Ribbon does not display breadcrumb trail; ‘Browse’ and ‘Page’ tabs are missing </div>
<br />
<div closure_uid_6bayw="208">
<strong>b. Fix:</strong> Edit the page-check in-refresh browser and remove this line from SharePoint Designer:</div>
<br />
<div closure_uid_6bayw="304">
<content contentplaceholderid="PlaceHolderTitleBreadcrumb" runat="server"></content></div>
<div closure_uid_6bayw="209">
<strong>c. Reference:</strong> <a href="http://sharepointconnoisseur.blogspot.com/2011/02/sharepoint-2010-upgrade-site-navigation.html">http://sharepointconnoisseur.blogspot.com/2011/02/sharepoint-2010-upgrade-site-navigation.html</a> </div>
<br />
<div closure_uid_6bayw="210">
<br /></div>
<div closure_uid_6bayw="211">
<strong><u>3. Content Types:</u></strong></div>
<div closure_uid_6bayw="212">
<br /></div>
<div closure_uid_6bayw="213">
<strong>a. Issue:</strong> Content Types do not work for uploading new items to a library </div>
<br />
<div closure_uid_6bayw="214">
<strong>b. Fix:</strong> Apply a new custom form in SPS 2010</div>
<br />
<div closure_uid_6bayw="215">
<strong>c. Reference: </strong><a href="http://technet.microsoft.com/en-us/library/cc424972.aspx">http://technet.microsoft.com/en-us/library/cc424972.aspx</a></div>
<br />
<br />
<div closure_uid_6bayw="216">
<strong><u>4. Trusted File Locations:</u></strong></div>
<br />
<div closure_uid_6bayw="217">
<strong>a. Issue:</strong> Excel documents won’t open</div>
<br />
<div closure_uid_6bayw="218">
<strong>b. Fix:</strong> Recreate/create a new Trusted File location</div>
<br />
<div closure_uid_6bayw="219">
<strong>c. Reference:</strong> <a href="http://technet.microsoft.com/en-us/library/ff191194.aspx">http://technet.microsoft.com/en-us/library/ff191194.aspx</a></div>
<br />
<div closure_uid_6bayw="220">
<br /></div>
<div closure_uid_6bayw="221">
<strong><u>5. Database connections:</u></strong></div>
<div closure_uid_6bayw="224">
<br /></div>
<div closure_uid_6bayw="222">
<strong>a. Issue:</strong> Cannot launch reports that tie to a database connection</div>
<br />
<div closure_uid_6bayw="225">
<strong>b. Fix:</strong> Update WFE Web.config to allow code blocks</div>
<br />
<div closure_uid_6bayw="226">
<strong>c. Reference:</strong> <a href="http://anyrest.wordpress.com/2010/10/21/how-to-enable-code-blocks-in-sharepoint-2010-works-also-in-2007/">http://anyrest.wordpress.com/2010/10/21/how-to-enable-code-blocks-in-sharepoint-2010-works-also-in-2007/</a></div>
<div closure_uid_6bayw="227">
<br /></div>
<br />
<div closure_uid_6bayw="228">
<strong><u>6. Navigation:</u></strong></div>
<br />
<div closure_uid_6bayw="229">
<strong>a. Issue:</strong> The site did not correctly inherit its Quick Launch Navigation structure; the site did not correctly inherit its Global Navigation</div>
<br />
<div closure_uid_6bayw="230">
<strong>b. Fix:</strong> Configure new default and custom master pages</div>
<br />
<div closure_uid_6bayw="231">
<strong>c. Reference: </strong></div>
<div closure_uid_6bayw="231">
<br /></div>
<div closure_uid_6bayw="231">
1. <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/modify-the-default-master-page-HA010100906.aspx">http://office.microsoft.com/en-us/sharepoint-designer-help/modify-the-default-master-page-HA010100906.aspx</a></div>
<br />
<div closure_uid_6bayw="433">
2. <a href="http://geekswithblogs.net/mbridge/archive/2010/10/03/sharepoint-2010-hosting--deploying-a-custom-master-page-in.aspx">http://geekswithblogs.net/mbridge/archive/2010/10/03/sharepoint-2010-hosting--deploying-a-custom-master-page-in.aspx</a></div>
<br />
<br />
<div closure_uid_6bayw="232">
<strong>a. Issue:</strong> Second level navigation from the dropdown in Global Navigation is missing</div>
<br />
<div closure_uid_6bayw="233">
<strong>b. Fix:</strong> Reconfigure the master page</div>
<br />
<div closure_uid_6bayw="234">
<strong>c. Reference:</strong> <a href="http://www.sharepointassist.com/2009/01/14/quick-launch-fly-out-menus/">http://www.sharepointassist.com/2009/01/14/quick-launch-fly-out-menus/</a></div>
<br />
<br />
<div closure_uid_6bayw="235">
<strong>a. Issue:</strong> Duplicate tabs in the Global Navigation </div>
<br />
<div closure_uid_6bayw="236">
<strong>b. Fix:</strong> Delete the extra link through the Navigation configuration; deploy publishing feature</div>
<br />
<div closure_uid_6bayw="237">
<strong>c. Reference:</strong> <a href="http://technet.microsoft.com/en-us/library/ee695757.aspx">http://technet.microsoft.com/en-us/library/ee695757.aspx</a></div>
<div closure_uid_6bayw="238">
<br /></div>
<br />
<div closure_uid_6bayw="239">
<strong>a. Issue:</strong> The visual upgrade caused all links in the Quick Launch to go away</div>
<br />
<div closure_uid_6bayw="240">
<strong>b. Fix:</strong> The Quick Launch is based on a custom master page, master page must be redone for SPS 2010 post-migration. Design a new custom master page for this site. Reconfigure this site to use audiences to control visibility of the navigation links.</div>
<br />
<div closure_uid_6bayw="241">
<strong>c. Reference:</strong> </div>
<div closure_uid_6bayw="241">
<br /></div>
<div closure_uid_6bayw="241">
1 . <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/introduction-to-sharepoint-master-pages-HA102019628.aspx">http://office.microsoft.com/en-us/sharepoint-designer-help/introduction-to-sharepoint-master-pages-HA102019628.aspx</a></div>
<br />
<div closure_uid_6bayw="446">
2. <a href="http://technet.microsoft.com/en-us/library/cc261958.aspx">http://technet.microsoft.com/en-us/library/cc261958.aspx</a></div>
<br />
<div closure_uid_6bayw="242">
<br /></div>
<div closure_uid_6bayw="243">
<strong><u>7. Views/Custom Views:</u></strong></div>
<br />
<div closure_uid_6bayw="244">
<strong>a. Issue:</strong> Error when accessing views from the Library Settings Panel</div>
<br />
<div closure_uid_6bayw="245">
<strong>b. Fix:</strong> Recreate the Content Type and Library</div>
<br />
<div closure_uid_6bayw="246">
<strong>c. Reference:</strong> <a href="http://www.learningsharepoint.com/2010/10/22/create-content-type-in-sharepoint-2010/">http://www.learningsharepoint.com/2010/10/22/create-content-type-in-sharepoint-2010/</a></div>
<br />
<br />
<div closure_uid_6bayw="247">
<strong>a. Issue:</strong> Calculated columns using Content Types as metadata are not working</div>
<br />
<div closure_uid_6bayw="248">
<strong>b. Fix:</strong> Reconfigure the calculated columns to not use Content Types as metadata</div>
<div closure_uid_6bayw="249">
<br /></div>
<br />
<div closure_uid_6bayw="250">
<strong>a. Issue:</strong> Trying to change to datasheet view produces this error: ‘The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold enforced by the administrator.’</div>
<br />
<div closure_uid_6bayw="251">
<strong>b. Fix:</strong> In CA set the list view lookup threshold to 10,000. After some research, it appears that the threshold for the List View Lookup will need to be modified. </div>
<br />
Your SharePoint administrator needs to change the Resource Throttling settings under Central Administration > Application Management > Manage Web Application > Your Web Application > General Settings > Resource Throttling. Set the List View Lookup Threshold value to a number larger than the number of lookup and workflow status column in the library and view<br />
<br />
<div closure_uid_6bayw="252">
<strong>c. References: </strong></div>
<br />
<div closure_uid_6bayw="453">
1. <a href="http://www.mainsoft.com/content/lookup-limit-error-sharepoint-2010-0x8007009">http://www.mainsoft.com/content/lookup-limit-error-sharepoint-2010-0x8007009</a></div>
<br />
<div closure_uid_6bayw="457">
2. <a href="http://office.microsoft.com/en-us/sharepoint-server-help/manage-lists-and-libraries-with-many-items-HA010378155.aspx?CTT=1">http://office.microsoft.com/en-us/sharepoint-server-help/manage-lists-and-libraries-with-many-items-HA010378155.aspx?CTT=1</a></div>
<br />
<div closure_uid_6bayw="461">
3. <a href="http://blogs.msdn.com/b/dinaayoub/archive/2010/04/22/sharepoint-2010-how-to-change-the-list-view-threshold.aspx">http://blogs.msdn.com/b/dinaayoub/archive/2010/04/22/sharepoint-2010-how-to-change-the-list-view-threshold.aspx</a></div>
<br />
<div closure_uid_6bayw="465">
4. <a href="http://office.microsoft.com/en-us/sharepoint-server-help/manage-lists-and-libraries-with-many-items-HA010280141.aspx?CTT=1">http://office.microsoft.com/en-us/sharepoint-server-help/manage-lists-and-libraries-with-many-items-HA010280141.aspx?CTT=1</a></div>
<br />
<br />
<div closure_uid_6bayw="253">
<strong><u>8. Web Parts:</u></strong></div>
<div closure_uid_6bayw="254">
<br /></div>
<div closure_uid_6bayw="255">
<strong>a. Issue:</strong> Clicking on an item in a web part does not lead to the item</div>
<br />
<div closure_uid_6bayw="256">
<strong>b. Fix:</strong> Recreate web part</div>
<br />
<div closure_uid_6bayw="257">
<strong>c. Reference:</strong> <a href="http://blogs.msdn.com/b/jpic/archive/2010/03/08/sharepoint-2010-out-of-the-box-web-parts.aspx">http://blogs.msdn.com/b/jpic/archive/2010/03/08/sharepoint-2010-out-of-the-box-web-parts.aspx</a></div>
<br />
<br />
<div closure_uid_6bayw="258">
<strong>a. Issue:</strong> Web Parts do not display</div>
<br />
<div closure_uid_6bayw="259">
<strong>b. Fix:</strong> Recreate the web parts</div>
<br />
<div closure_uid_6bayw="260">
<strong>c. Reference:</strong> <a href="http://blogs.msdn.com/b/jpic/archive/2010/03/08/sharepoint-2010-out-of-the-box-web-parts.aspx">http://blogs.msdn.com/b/jpic/archive/2010/03/08/sharepoint-2010-out-of-the-box-web-parts.aspx</a></div>
<br />
<br />
<div closure_uid_6bayw="261">
<strong>a. Issue:</strong> Custom Filter Web Part errors out and page hangs</div>
<br />
<div closure_uid_6bayw="262">
<strong>b. Fix:</strong> Modify the Ajax Options to Enable Asynchronous Update </div>
<br />
<div closure_uid_6bayw="263">
<strong>c. Reference:</strong> <a href="http://weblogs.asp.net/jan/archive/2010/03/01/little-sharepoint-2010-gem-ajax-options-in-list-view-web-parts.aspx">http://weblogs.asp.net/jan/archive/2010/03/01/little-sharepoint-2010-gem-ajax-options-in-list-view-web-parts.aspx</a></div>
<br />
<br />
<div closure_uid_6bayw="264">
<strong>a. Description:</strong> “This list does not exist” error, cannot toggle between months in Calendar</div>
<br />
<div closure_uid_6bayw="265">
<strong>b. Fix:</strong> Recreate the web part</div>
<br />
<div closure_uid_6bayw="266">
<strong>c. Reference:</strong> <a href="http://blogs.msdn.com/b/jpic/archive/2010/03/08/sharepoint-2010-out-of-the-box-web-parts.aspx">http://blogs.msdn.com/b/jpic/archive/2010/03/08/sharepoint-2010-out-of-the-box-web-parts.aspx</a></div>
<br />
<br />
<div closure_uid_6bayw="267">
<strong><u>9. Hiding Content</u></strong></div>
<br />
<div closure_uid_6bayw="268">
<strong>a. Issue:</strong> ‘All Site Content’ and the ‘Recycle Bin’ should be hidden</div>
<br />
<div closure_uid_6bayw="269">
<strong>b. Fix:</strong> Reconfigure the site to use custom master page; this will have different security to hide ‘All Site Content’ and the ‘Recycle Bin’</div>
<br />
<div closure_uid_6bayw="270">
<strong>c. References:</strong> <a href="http://www.learningsharepoint.com/2010/07/06/hiding-view-all-site-content-and-recycle-bin-link-from-quick-launch">http://www.learningsharepoint.com/2010/07/06/hiding-view-all-site-content-and-recycle-bin-link-from-quick-launch</a></div>
<br />
<br />
<div closure_uid_6bayw="271">
<strong><u>10. Site Usage Reports:</u></strong></div>
<br />
<div closure_uid_6bayw="272">
<strong>a. Issue:</strong> Site Usage report will not display</div>
<br />
<div closure_uid_6bayw="273">
<strong>b. Fix:</strong> Recreate link to point to OOTB SharePoint Web Analytics</div>
<br />
<div closure_uid_6bayw="274">
<strong>c. Reference:</strong> <a href="http://blogs.msdn.com/b/ecm/archive/2010/03/21/introducing-web-analytics-in-sharepoint-2010.aspx">http://blogs.msdn.com/b/ecm/archive/2010/03/21/introducing-web-analytics-in-sharepoint-2010.aspx</a></div>
<div closure_uid_6bayw="275">
<br /></div>
<br />
<div closure_uid_6bayw="276">
<strong><u>11. Appearance:</u></strong></div>
<br />
<div closure_uid_6bayw="277">
<strong closure_uid_6bayw="284">a. Issue:</strong> Site does not have the 2010 master page applied </div>
<br />
<div closure_uid_6bayw="278">
<strong>b. Fix:</strong> Deploy custom master page </div>
<br />
<div closure_uid_6bayw="279">
<strong>c. Reference:</strong> <a href="http://geekswithblogs.net/mbridge/archive/2010/10/03/sharepoint-2010-hosting--deploying-a-custom-master-page-in.aspx">http://geekswithblogs.net/mbridge/archive/2010/10/03/sharepoint-2010-hosting--deploying-a-custom-master-page-in.aspx</a></div>
<div closure_uid_6bayw="280">
<br /></div>
<div closure_uid_6bayw="281">
<strong closure_uid_6bayw="285">a. Issue:</strong> The blue bar at the top doesn’t extend the entire way</div>
<br />
<div closure_uid_6bayw="282">
<strong>b. Fix:</strong> Reconfigure the site to use the new and default custom Master Page</div>
<br />
<div closure_uid_6bayw="283">
<strong>c. Reference:</strong> </div>
<div closure_uid_6bayw="283">
<br /></div>
<div closure_uid_6bayw="283">
1. <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/modify-the-default-master-page-HA010100906.aspx">http://office.microsoft.com/en-us/sharepoint-designer-help/modify-the-default-master-page-HA010100906.aspx</a></div>
<br />
<div closure_uid_6bayw="493">
2. <a href="http://geekswithblogs.net/mbridge/archive/2010/10/03/sharepoint-2010-hosting--deploying-a-custom-master-page-in.aspx">http://geekswithblogs.net/mbridge/archive/2010/10/03/sharepoint-2010-hosting--deploying-a-custom-master-page-in.aspx</a></div>
<br />
<br />
<div closure_uid_6bayw="286">
<strong>a. Issue:</strong> Cannot open meeting dates links-various errors</div>
<br />
<div closure_uid_6bayw="287">
<strong>b. Fix:</strong> This is a master page issue </div>
<br />
<div closure_uid_6bayw="288">
<strong>c. Reference:</strong> <a href="http://blogs.msdn.com/b/spdsupport/archive/2008/03/24/how-to-fix-recurring-meeting-workspace-error-g-instanceid-is-undefined.aspx">http://blogs.msdn.com/b/spdsupport/archive/2008/03/24/how-to-fix-recurring-meeting-workspace-error-g-instanceid-is-undefined.aspx</a> </div>
<br />
<br />
<div closure_uid_6bayw="289">
<strong>a. Issue:</strong> Page opens in 2007</div>
<br />
<div closure_uid_6bayw="290">
<strong>b. Fix:</strong> Update Navigation to use absolute URLs</div>
<br />
<div closure_uid_6bayw="291">
<strong closure_uid_6bayw="292">c. Reference:</strong> </div>
<div closure_uid_6bayw="291">
<br /></div>
<div closure_uid_6bayw="291">
1. <a href="http://raiumair.wordpress.com/2009/01/16/who-says-you-cant-change-the-url-for-a-document-library/">http://raiumair.wordpress.com/2009/01/16/who-says-you-cant-change-the-url-for-a-document-library/</a> </div>
<br />
<div closure_uid_6bayw="506">
2. <a href="http://blog.lanactech.com/?p=246">http://blog.lanactech.com/?p=246</a></div>
<div closure_uid_6bayw="293">
<br /></div>
<div closure_uid_6bayw="294">
<strong>a. Issue:</strong> Logo (that is a link) in the top bar that has the title of the page points to the wrong page</div>
<br />
<div closure_uid_6bayw="295">
<strong>b. Fix:</strong> Redeploy master pages</div>
<br />
<div closure_uid_6bayw="297">
<strong>c. Reference:</strong> <a href="http://geekswithblogs.net/mbridge/archive/2010/10/03/sharepoint-2010-hosting--deploying-a-custom-master-page-in.aspx">http://geekswithblogs.net/mbridge/archive/2010/10/03/sharepoint-2010-hosting--deploying-a-custom-master-page-in.aspx</a></div>
<div closure_uid_6bayw="298">
<br /></div>
<br />
<div closure_uid_6bayw="299">
<strong>a. Issue:</strong> The Visual Upgrade was not applied</div>
<br />
<div closure_uid_6bayw="300">
<strong>b. Fix:</strong> The SPS 2010 default and custom master pages will need to be applied</div>
<br />
<div closure_uid_6bayw="301">
<strong>c. Reference:</strong> </div>
<div closure_uid_6bayw="301">
<br /></div>
<div closure_uid_6bayw="301">
1. <a href="http://technet.microsoft.com/en-us/library/ff607998.aspx">http://technet.microsoft.com/en-us/library/ff607998.aspx</a></div>
<br />
<div closure_uid_6bayw="302">
2. <a href="http://meligo.blog.com/2010/05/10/visual-upgrade-sharepoint-2010-easy-way-and-hard-way/">http://meligo.blog.com/2010/05/10/visual-upgrade-sharepoint-2010-easy-way-and-hard-way/</a></div>
<br />
<br />
Thanks to Rachel for all her help with this Blog!<br />
<br />
I hope that helps!<br />
<br />
Tom Molskow<br />
<br /></div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com1tag:blogger.com,1999:blog-3981477210525148311.post-56693117134363720122011-07-26T17:24:00.003-04:002012-01-11T21:18:24.117-05:00SharePoint Designer 2007 – Business Days Task Reminder Workflow<div dir="ltr" style="text-align: left;" trbidi="on">
<div closure_uid_e36gh8="127" closure_uid_hkjt07="139" closure_uid_oige92="140">
<div closure_uid_e36gh8="126">
1. In this article we will discuss how to use SharePoint Designer (SPD) 2007 to create a Business Days Task Reminder Workflow. Here is our scenario:</div>
<br />
<div closure_uid_oige92="316">
a. A business leader assigns a task or tasks to an employee with a due date</div>
<br />
b. The employee receives an initial task alert e-mail message<br />
<br />
<div closure_uid_oige92="317">
c. Four business days before the due date, if the task has not been completed, the employee receives a reminder e-mail</div>
<br />
d. Two business days after the due date, if the task has not been completed, the employee receives the first late reminder e-mail<br />
<br />
<div closure_uid_oige92="142">
e. Seven business days after the due date, if the task has not been completed, the employee receives the first second reminder e-mail</div>
<br />
<div closure_uid_oige92="143">
2. To setup our environment we will need to create a custom task list. From the front page of your SharePoint site follow this click path: Site Actions -> Create -> Tracking -> Tasks. Name the new list “Business Days Task Reminder Workflow”. Choose “No” for the “Send e-mail when ownership is assigned” function. The list will have the following standard fields:</div>
<br />
<ul style="text-align: left;">
<li><div closure_uid_oige92="246" style="text-align: left;">
Title - Single Line of Text</div>
</li>
<li><div closure_uid_oige92="246" style="text-align: left;">
Priority - Choice</div>
</li>
<li><div closure_uid_oige92="246" style="text-align: left;">
Status - Choice</div>
</li>
<li><div closure_uid_oige92="246" style="text-align: left;">
% Complete - Number</div>
</li>
<li><div closure_uid_oige92="246" style="text-align: left;">
Assigned To - Person or Group</div>
</li>
<li><div closure_uid_oige92="246" style="text-align: left;">
Description - Multiple lines of text</div>
</li>
<li><div closure_uid_oige92="246" style="text-align: left;">
Start Date - Date and Time</div>
</li>
<li><div closure_uid_oige92="246" style="text-align: left;">
Due Date - Date and Time</div>
</li>
</ul>
<div closure_uid_oige92="151">
3. To build this application we will need four custom components, the SPD workflow to send the e-mail alerts, and three calculated columns to define the proper business day ranges, i.e. four days before due date, two days after the due date, and seven days after the due date.</div>
<br />
<div closure_uid_oige92="152">
4. To build the calculated columns we need to first configure our calculated columns to count business days (Monday through Friday) and ignore weekends (Saturday and Sunday). This can be done using the calculated column’s Weekday function and some simple conditional logic. The Weekday function returns an integer for each day of the week, as shown below:</div>
<br />
<ul style="text-align: left;">
<li><div closure_uid_oige92="262">
Sunday 1</div>
</li>
<li><div closure_uid_oige92="264">
Monday 2</div>
</li>
<li closure_uid_oige92="268">Tuesday 3</li>
<li><div closure_uid_oige92="266">
Wednesday 4</div>
</li>
<li><div closure_uid_oige92="266">
Thursday 5</div>
</li>
<li><div closure_uid_oige92="266">
Friday 6</div>
</li>
<li><div closure_uid_oige92="266">
Saturday 7</div>
</li>
</ul>
<div closure_uid_oige92="271">
Now using the Weekday function we can use some simple conditional logic to determine business day, such as shown below:</div>
<br />
<div closure_uid_oige92="155">
If Weekday > 1 and Weekday < 7</div>
<br />
<div closure_uid_oige92="156">
5. Unfortunately it’s not enough to simply know that the date is a business day, we also have to know how many business days it is from the Due Date, and we have to know this for both before and after the due date. So let’s look at the logic to determine these dates, first here is the logic for calculating 4 business days before the Due Date:</div>
<br />
<div closure_uid_oige92="157">
=IF(WEEKDAY([Due Date])<6,[Due Date]-6,IF(WEEKDAY([Due Date])=6,[Due Date]-4,[Due Date]-4))</div>
<br />
Essentially this logic can be explained as follows:<br />
<div closure_uid_oige92="158">
<br /></div>
• If the Due Date is before Friday, subtract 6 from the Due Date to derive the date 4 business days before the Due Date<br />
<div closure_uid_oige92="159">
<br /></div>
<div closure_uid_oige92="160">
• If the Due Date is a Friday, subtract 4 from the Due Date to derive the date 4 business days before the Due Date</div>
<div closure_uid_oige92="160">
<br /></div>
<div closure_uid_oige92="161">
• We don’t need logic for a Due Date of Saturday or Sunday since those aren’t business days</div>
<br />
6. Next, here is the logic for calculating 2 business days after the Due Date:<br />
<br />
<div closure_uid_oige92="315">
=IF(WEEKDAY([Due Date])>4,[Due Date]+4,IF(WEEKDAY([Due Date])>1,[Due Date]+2,[Due Date]+2))</div>
<br />
<div closure_uid_oige92="162">
Essentially this logic can be explained as follows:</div>
<br />
<div closure_uid_oige92="163">
• If the Due Date is after Wednesday, add 4 to the Due Date to derive the date 2 business days after the Due Date</div>
<br />
<div closure_uid_oige92="164">
• If the Due Date is after Sunday, add 4 to the Due Date to derive the date 2 business days after the Due Date</div>
<br />
<div closure_uid_oige92="165">
• We don’t need logic for a Due Date of Saturday or Sunday since those aren’t business days</div>
<br />
7. Finally, here is the logic for calculating 7 business days after the Due Date:<br />
<br />
=IF(WEEKDAY([Due Date])<5,[Due Date]+9,[Due Date]+11)<br />
<br />
<div closure_uid_oige92="166">
Essentially this logic can be explained as follows:</div>
<br />
<div closure_uid_oige92="167">
• If the Due Date is before Thursday, add 9 to the Due Date to derive the date 7 business days after the Due Date</div>
<br />
<div closure_uid_oige92="168">
• If the Due Date is Thursday or later, add 11 to the Due Date to derive the date 7 business days after the Due Date</div>
<br />
<div closure_uid_oige92="169">
8. Next we need to add all the other lists elements as shown below (Picture1):</div>
<div closure_uid_oige92="169">
<br /></div>
<div closure_uid_oige92="169">
<br /></div>
<div class="separator" closure_uid_oige92="296" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl08QOSPx2T8m7PkdEcFFlkZNYQ1g1FAqgEMBaxxc_zke8cpC4qEmRjIJx6HXt1bGjeoBt_aY26XbIIdnVehdzZirFZXlBmyKknhyphenhyphencZRSGxsKZLaHCQRrDJLgtrP5ovrqCrMCHt3KhqnA/s1600/Picture1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="292px" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl08QOSPx2T8m7PkdEcFFlkZNYQ1g1FAqgEMBaxxc_zke8cpC4qEmRjIJx6HXt1bGjeoBt_aY26XbIIdnVehdzZirFZXlBmyKknhyphenhyphencZRSGxsKZLaHCQRrDJLgtrP5ovrqCrMCHt3KhqnA/s320/Picture1.JPG" t$="true" width="320px" /></a></div>
<br />
There is one other calculated column, Start Date – No Time, its calculation is shown below:<br />
<br />
<div closure_uid_oige92="314">
=TEXT([Start Date],"mmm-dd-yyyy")</div>
<br />
<div closure_uid_oige92="170">
And finally, there are two choice columns, they have these values:</div>
<br />
<div closure_uid_oige92="171">
• Priority:</div>
<br />
<div closure_uid_oige92="312">
(1) High</div>
<br />
<div closure_uid_oige92="297">
(2) Normal</div>
<br />
<div closure_uid_oige92="172">
(3) Low</div>
<br />
<div closure_uid_oige92="313">
• Status:</div>
<br />
<div closure_uid_oige92="298">
No Action Taken</div>
<br />
<div closure_uid_oige92="299">
Approved</div>
<br />
<div closure_uid_oige92="173">
Denied</div>
<br />
<div closure_uid_oige92="174">
9. Now that we have all the date calculations and other columns in place we can easily create a workflow to send reminders on those dynamic dates. The workflow will be configured to run on "Item Created". Our workflow will have the following four steps:</div>
<br />
<div closure_uid_oige92="300">
a. Send Initial Email</div>
<br />
<div closure_uid_oige92="301">
b. Remind 4 Days Before</div>
<br />
<div closure_uid_oige92="302">
c. Remind 2 Days After</div>
<br />
<div closure_uid_oige92="175">
d. Remind 7 Days After</div>
<br />
<div closure_uid_oige92="176">
10. Here is the logic for Step 1 – Send Initial Email (Picture 2):</div>
<div closure_uid_oige92="176">
<br /></div>
<div closure_uid_oige92="176">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJJ6u_B7abpsU0ZOk13a0BFWc1N3hNHQ0Bj2Xpin2j6FlE1sSO36KdqsAJMii0JHRQeB59Ac7aVwI8JLJdWd5SUwVNKUZz94PZoQPDHyLZcmJjhKbW36krF0t27A5UBtXCcICvpcq78mo/s1600/Picture2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="286px" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJJ6u_B7abpsU0ZOk13a0BFWc1N3hNHQ0Bj2Xpin2j6FlE1sSO36KdqsAJMii0JHRQeB59Ac7aVwI8JLJdWd5SUwVNKUZz94PZoQPDHyLZcmJjhKbW36krF0t27A5UBtXCcICvpcq78mo/s320/Picture2.JPG" t$="true" width="320px" /></a></div>
<br />
<div closure_uid_oige92="177">
The “Due Date – No Time does not contain Dec-30-1899” and the “Start Date – No Time does not contain Dec-30-1899”. These conditions are present to prevent the workflow from running if the user has not provided a Due Date or a Start Date. Normally these would be mandatory fields but in this case the customer wanted the ability to do a draft task, and not have to worry about the workflow sending out partial data. If the user doesn’t supply a Due Date or a Start Date the calculated column will generate a date of Dec-30-1899 (because the date is blank) and the workflow will not start.</div>
<br />
<div closure_uid_oige92="178">
I use a Boolean called First Run to tell me if the workflow has been rerun and if so to protect against certain conditions causing errors. As you will see, all the other steps will only be run if First Run equals “No”. The First Run value is changed when the Action “Update Items in Tasks” runs (the third Action in this step).</div>
<br />
<div closure_uid_oige92="179">
The initial e-mail is sent to the Assignee in the second Action of this step. Obviously the content of the e-mail can be whatever the user requires but essentially it is informing the recipient about the details of the tasks they must perform.</div>
<br />
<div closure_uid_oige92="180">
As you can see in the pause action, the pause is set to a date and the date is set equal to the calculated column “Due Date Minus 4 BDs”.</div>
<br />
<div closure_uid_oige92="181">
11. Here is the logic for Step 2 - Remind 4 Days Before (Picture 3):</div>
<div closure_uid_oige92="181">
<br /></div>
<div closure_uid_oige92="181">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR2x8bdHtDEvpEMuTwMwkgfNIiItdMW6JTuh-kGSiOcHdJSqdkpLEk2jjnT9KgybPnNrOUUVQG6v0OZCh5CnpfKQ9-tn_WflpomWq15ztVT7YpIm2Tam5-FXb8FIWFTV7RtF3mSIIZ8Vk/s1600/Picture3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="246px" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR2x8bdHtDEvpEMuTwMwkgfNIiItdMW6JTuh-kGSiOcHdJSqdkpLEk2jjnT9KgybPnNrOUUVQG6v0OZCh5CnpfKQ9-tn_WflpomWq15ztVT7YpIm2Tam5-FXb8FIWFTV7RtF3mSIIZ8Vk/s320/Picture3.JPG" t$="true" width="320px" /></a></div>
<br />
<div closure_uid_oige92="182">
In the conditions the First Run value should now be changed to “No”, if the value is “Yes” it means the conditions of the first step were not met and therefore this step should not run either.</div>
<br />
<div closure_uid_oige92="183">
The second e-mail is sent to the Assignee in the second Action of this step. The content of the e-mail can be whatever the user requires but basically it’s a reminder that the task has still not been completed.</div>
<br />
<div closure_uid_oige92="184">
As you can see in the pause action, the pause is set to a date and the date is set equal to the calculated column “Due Date Plus 2 BDs”.</div>
<br />
<div closure_uid_oige92="185">
12. Here is the logic for Step 3 - Remind 2 Days After (Picture 4):</div>
<div closure_uid_oige92="185">
<br /></div>
<div closure_uid_oige92="185">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVMGnJm4J2tcTP_TanLAImoSIBzP4xw0nb2ByeH9c1PlFjo9LlgclT7ki1eQvaqO_FU9gUydBj7xmB1rJzoq8UJDWVz6Y61M-QLjHwKemYye41ePxo6RlNdP_Ybf50Y7_Y3JwHoUYalZM/s1600/Picture4.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="234px" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVMGnJm4J2tcTP_TanLAImoSIBzP4xw0nb2ByeH9c1PlFjo9LlgclT7ki1eQvaqO_FU9gUydBj7xmB1rJzoq8UJDWVz6Y61M-QLjHwKemYye41ePxo6RlNdP_Ybf50Y7_Y3JwHoUYalZM/s320/Picture4.JPG" t$="true" width="320px" /></a></div>
<br />
<div closure_uid_oige92="187">
Again, in the conditions the First Run value should now be changed to “No”, if the value is “Yes” it means the conditions of the first step were not met and therefore this step should not run either.</div>
<br />
<div closure_uid_oige92="188">
The third e-mail is sent to the Assignee in the second Action of this step. The content of the e-mail can be whatever the user requires but again basically it’s a reminder that the task has still not been completed.</div>
<br />
<div closure_uid_oige92="189">
As you can see in the pause action, the pause is set to a date and the date is set equal to the calculated column “Due Date Plus 7 BDs”.</div>
<br />
<div closure_uid_oige92="190">
13. Here is the logic for Step 3 - Remind 7 Days After (Picture 5):</div>
<div closure_uid_oige92="190">
<br /></div>
<div closure_uid_oige92="190">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggoleWGHjOYeP8SCIpzV4i8v8Dmlt8JbWo1bxJPrgbeD3KRUWsKqESAQZhS96cv-nkTR9GB0gPJsJrBVwcWSJ5BmmP06NJLHk5udacn4n4GUxx506WuMu8lNg9z4IJ924aqZvnHTUrjlE/s1600/Picture5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="195px" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEggoleWGHjOYeP8SCIpzV4i8v8Dmlt8JbWo1bxJPrgbeD3KRUWsKqESAQZhS96cv-nkTR9GB0gPJsJrBVwcWSJ5BmmP06NJLHk5udacn4n4GUxx506WuMu8lNg9z4IJ924aqZvnHTUrjlE/s320/Picture5.JPG" t$="true" width="320px" /></a></div>
<br />
<div closure_uid_oige92="191">
Again, in the conditions the First Run value should now be changed to “No”, if the value is “Yes” it means the conditions of the first step were not met and therefore this step should not run either.</div>
<br />
<div closure_uid_oige92="192">
The final e-mail is sent to the Assignee in the second Action of this step. The content of the e-mail can be whatever the user requires but basically it’s a notice to the end user that the task has still not been completed within the allotted time.</div>
<br />
<div closure_uid_oige92="193">
14. OK, now both our calculated columns and our workflow are ready! Now let’s try out our application. Create a new task in the task list. Fill out the task as normally but in the Status field choose “No Action Taken”. For testing choose yourself as the “Assigned To”. Select the current date as the “Start Date”, and a day a week from now as the “Due Date”. Finally, click the OK button to start the workflow.</div>
<div closure_uid_oige92="193">
<br /></div>
<div closure_uid_oige92="193">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYLAav-wdTLsftBOykNI4Zf5rtWYldNjDDxhAngri2LknlZCrYwXQTJkAi0xixjofrUaXrQuxXBOfYm5OcJxQadI8Su6ZpXien6gQ3TX38OYqvAqiz0Ah_aopvZcwjoWM3bUgwIoJVho0/s1600/Picture6.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240px" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYLAav-wdTLsftBOykNI4Zf5rtWYldNjDDxhAngri2LknlZCrYwXQTJkAi0xixjofrUaXrQuxXBOfYm5OcJxQadI8Su6ZpXien6gQ3TX38OYqvAqiz0Ah_aopvZcwjoWM3bUgwIoJVho0/s320/Picture6.JPG" t$="true" width="320px" /></a></div>
<br />
<div closure_uid_oige92="194">
15. If everything is built correctly the workflow should send out an initial e-mail, a reminder e-mail 4 business days before the Due Date, another reminder e-mail 2 business days after the Due Date, and a final reminder e-mail 7 business days after the Due Date.</div>
<br />
16. As always the power and utility of SharePoint Designer workflows amazes me – all this function without any code – now that is awesome!<br />
<br />
<br />
I hope that helps!<br />
<br />
Tom Molskow<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
</div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com12tag:blogger.com,1999:blog-3981477210525148311.post-54071100697160258292011-02-08T13:59:00.001-05:002013-03-21T16:43:55.009-04:00How to Manipulate the People Picker Control Using JavaScript<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
1. Introduction: While Microsoft provides some clear guidance on how to manipulate SharePoint 2007 controls using JavaScript (see the article here) this guidance does not include the People Picker control. The purpose of this article is to provide some of that missing guidance.<br />
<br />
2. The People Picker: The People Picker control is more complex than other SharePoint form controls; while most of the SharePoint form controls provide a simple means to capture direct user input, the People Picker control goes beyond this simple functionality to allow the user to access and browse SharePoint’s security and accounts listings. Because of this added capability the control’s is more difficult to manipulate with JavaScript but, as you will see, there is still a way to use our method successfully.<br />
<br />
3. The getTagFromIdentifierAndTitle Method: To locate the SharePoint form fields Microsoft recommends using the “getTagFromIdentifierAndTitle” function. The Microsoft SharePoint Designer Team tells us that “This function finds the HTML element rendered by a given SharePoint FormField control.” The signature of the getTagFromIdentifierAndTitle is as shown below:<br />
<br />
getTagFromIdentifierAndTitle(tagName, identifier, title)<br />
<br />
The function takes three parameters, tagName, identifier, and title: <br />
<br />
• The first parameter, “tagName”, is the name of the field’s tag as it is rendered in HTML<br />
<br />
• The second parameter, “identifier”, is the SharePoint field type<br />
<br />
• The third parameter, title, is the value of the field’s “title” attribute as it is rendered in HTML and also the field’s display name in SharePoint<br />
<br />
So, for example, to find a field named Title, which is a SharePoint Input control of the type Text Field, you would use the JavaScript below:<br />
<br />
var titleField = getTagFromIdentifierAndTitle("Input","TextField","Title")<br />
<br />
Once the value of the titleField variable is returned from the getTagFromIdentifierAndTitle, you can manipulate the Title field in a variety of ways by setting its properties programmatically. For example, if we wanted to now set the Title field to the value “New Title” we could do it like this:<br />
<br />
titleField.value = “New Title”<br />
<br />
4. People Picker Differences: So far so good, now let’s try to follow the same logic to find the value of a People Picker control, which for our example will be called “MyPeoplePicker”. Our function call might appear as the one shown below:<br />
<br />
var vPeople = getTagFromIdentifierAndTitle("Input","Lookup","MyPeoplePicker")<br />
<br />
But when we try to use this function to return the tag values of the People Picker control we get an “object set to null reference” error, or in other words, the getTagFromIdentifierAndTitle function cannot find a control matching the criteria we set. Several vain attempts later we learn that setting the parameters for the People Picker control is not easy or obvious. This is it not working because, as I stated earlier, the People Picker control is more complex.<br />
<br />
If we could look inside the People Picker control we would see some surprising things, the first of which is that the People Picker control is actually not a Lookup control at all but actually a Rich Text Area, the same as the multiple lines of text control. Next we would see that the People Picker control type is “UserField_downlevelTextBox” – now who would ever guess that one? Finally, the last surprise is that the title of the People Picker control is not the same as the display title; instead its title will always be “People Picker”.<br />
<br />
Armed with this new knowledge we have a new signature for our getTagFromIdentifierAndTitle function, which is shown below:<br />
<br />
getTagFromIdentifierAndTitle("Textarea","UserField_downlevelTextBox","People Picker");<br />
<br />
Now when we run our code again and this time it returns a value, the “object set to null reference” error is gone. So we are good to go – right?<br />
<br />
5. Still More Surprises: Not so fast! We have a way to return the People Picker object but there are still issues, let’s do an example to illustrate this. We want to write some code to return the People Picker object and then set the objects display style to none, or in other words, hide the People Picker control from the user. Here is the code:<br />
<br />
var vPeople = getTagFromIdentifierAndTitle("Textarea","UserField_downlevelTextBox","People Picker");<br />
<br />
vPeople.style.display = “none”;<br />
<br />
While this code will work with the other SharePoint controls it doesn’t work with the People Picker control. Like all things about the People Picker control, it’s a more complex. To make this line of code work for the People Picker we have to modify it as shown below:<br />
<br />
vPeople.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.display="none";<br />
<br />
Now who was expecting that? Here’s what is going on, the People Picker control is actually 12 (yes twelve!) levels below its HTML tag and so we have to use multiple parentNode declarations to navigate from the tag to the People Picker control. So our corrected code would be as it appears below:<br />
<br />
var vPeople = getTagFromIdentifierAndTitle("Textarea","UserField_downlevelTextBox","People Picker");<br />
<br />
vPeople.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.display="none";<br />
<br />
Now our code finds and returns the People Picker control as well as manipulates it to hide it from the user. Problem solved! <br />
<br />
Here is the entire code block:<br />
<br />
//This runs the function when the form first loads<br />
_spBodyOnLoadFunctionNames.push("validatePeoplPicker");<br />
<br />
function validatePeoplPicker()<br />
{<br />
var assignedToSubmitter = getSPPeoplePicker("MyPeoplePicker");<br />
<br />
//This function finds and returns the proper SharePoint control's HTML<br />
function getTagFromIdentifierAndTitle(tagName, identifier, title) {<br />
var len = identifier.length;<br />
var tags = document.getElementsByTagName(tagName);<br />
for (var i = 0; i < tags.length; i++) {<br />
var tempString = tags[i].id;<br />
if (tags[i].title == title && (identifier == "" <br />
tempString.indexOf(identifier) == tempString.length - len)) {<br />
return tags[i];<br />
}}<br />
return null;<br />
}<br />
<br />
//This function finds the People Picker control's Parent element<br />
function getParentElementByTagName(baseNode, tagName) {<br />
var currNode;<br />
if (baseNode !== null) {<br />
currNode = baseNode.parentNode;<br />
while ((currNode !== null) && (currNode.nodeName != tagName)) {<br />
currNode = currNode.parentNode;<br />
}<br />
return currNode;<br />
}<br />
else {<br />
return null;<br />
}}<br />
<br />
//This function finds the People Picker control's Cell element<br />
function getPeoplePickerCell(columnName) {<br />
var search = 'FieldName="' + columnName + '"';<br />
var nodes = document.getElementsByTagName("TEXTAREA");<br />
for (var i = 0; i < nodes.length; i++) {<br />
if (nodes[i].title == "People Picker") {<br />
var outerCell = getParentElementByTagName(nodes[i], "SPAN").parentNode.parentNode;<br />
if (outerCell.innerHTML.indexOf(search) > 0) {<br />
return nodes[i].parentNode;<br />
}}}<br />
return null;<br />
}<br />
<br />
//This function returns the People Picker object<br />
function getSPPeoplePicker(columnName) <br />
{ <br />
var cell = getPeoplePickerCell(columnName); <br />
if(cell !== null) <br />
{ <br />
return cell.childNodes[0].innerHTML; <br />
} <br />
else <br />
{ <br />
return null; <br />
} } }<br />
<br />
6. Conclusion: The People Picker control definitely present more challenges to the SharePoint Designer/Developer, but by understanding it’s greater complexity you can begin to add dynamic functionality to your SharePoint forms using the People Picker control. <br />
<br />
Thanks to Kiran Kakanur’s for his great blog - <a href="http://kiran-kakanur.blogspot.com/2010/02/hide-people-picker-control-in.html">http://kiran-kakanur.blogspot.com/2010/02/hide-people-picker-control-in.html</a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br /></div>
Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com14tag:blogger.com,1999:blog-3981477210525148311.post-88080361873563806552011-01-13T09:20:00.006-05:002011-01-26T17:13:45.431-05:00SharePoint Designer Workflows 3 - Developing a Timer Loop for Workflows<div dir="ltr" style="text-align: left;" trbidi="on">1. Introduction: Many times when designing workflows there is a need to use a Workflow Timer. As you may know a workflow timer will process workflows at a specified time or interval. While SharePoint Designer does not provide an out of the box (OOTB) capability for creating workflow timers, still, there is a way to create a workflow timer using SPD workflows.<br />
<br />
2. Scenario: In our simple scenario we want our example workflow to run every five minutes. Now, given this is not a very realistic scenario, most users will want the workflow to run once a day, week, month, etc. However, once we have designed the mechanism to run a workflow every five minutes, it’s a simple matter of changing the pause delay to increase that to any duration needed.<br />
<br />
3. Explanation: Essentially we will have two workflows, running on two separate lists; one workflow, “Endless Loop”, creates an endless loop and the other workflow, “Delay”, one creates a delay or timer. The logic for the Endless Loop workflow looks like this:<br />
<br />
a. Calculate (increment) the loop counter<br />
<br />
b. Update the item in the Delay workflow with the counter value<br />
<br />
c. Log the Event<br />
<br />
The logic for the Delay workflow looks like this:<br />
<br />
a. Calculate (increment) the loop counter<br />
<br />
b. Pause (Delay) for a period of time<br />
<br />
c. Update the item in the Loop workflow with the counter value<br />
<br />
4. Overview: To build a Workflow Timer we will need two SharePoint lists, and two SharePoint workflows. The first list will contain our Loop workflow, and the second list will contain our Delay workflow. For obvious reasons we will call the first list “Endless Loop” and the second list “Delay”. To create the lists follow these steps:<br />
<br />
a. From the SharePoint site create a custom list, call it “Endless Loop”<br />
<br />
b. From the Loop list add a custom Number column, call it “Counter”, set it’s number of decimal places to 0 and it’s default value to 1, finally add it to the default view<br />
<br />
c. Create 1 item in the list and title it Endless Loop<br />
<br />
d. From the SharePoint site create a custom list, call it “Delay”<br />
<br />
e. From the Delay list add a custom Number column, call it “Counter”, set it’s number of decimal places to 0 and it’s default value to 1, finally add it to the default view<br />
<br />
f. Create 1 item in the list and title it Delay<br />
<br />
To create the workflows for these lists follow these steps:<br />
<br />
a. From SharePoint Designer create a workflow that is associated with the Endless Loop list, call it “Endless loop”<br />
<br />
b. Set this workflow to be started manually and to start automatically when an item is changed<br />
<br />
c. Create 1 step for the workflow, call it “Endless Loop”<br />
<br />
d. Create a condition – If Created By is not empty – this means the workflow will always run<br />
<br />
e. Add a Do Calculation item, set it to Calculate Endless Loop: Counter plus 1 (output to Variable: calc), the configuration should appear as below:<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOHJv4FhYvHWmRhKSqgzoRXeC6h607UNLdEHsVI2CZx03IbP1IQjNpqziCm7jZSXzlPB1jYClgdNndr6E1SAqHMSet6tCN828nLm9ERTtXmV0PqBpG9gTlg7cxzHN6R_YWVFhtlzb9Xv4/s1600/1.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="162" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOHJv4FhYvHWmRhKSqgzoRXeC6h607UNLdEHsVI2CZx03IbP1IQjNpqziCm7jZSXzlPB1jYClgdNndr6E1SAqHMSet6tCN828nLm9ERTtXmV0PqBpG9gTlg7cxzHN6R_YWVFhtlzb9Xv4/s320/1.JPG" width="320" /></a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
f. Add an Update List Item activity, update the Delay list, Delay item, changing the value of Counter to the workflow calc variable’s value, configure the activity as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaIZzseKRtwIBd5v-Vxvaz_ua99UR1HqVRdehuoTJ_ocu1tLSuGE_UE9FqUBwDd1XC4FzcQz-2H4Emcn0bp48dSp7ZI8wolxgtG8XBPOQJsSo-IQawvH9n01kvStAdriZfFhyei9nqsKw/s1600/2.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="284" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaIZzseKRtwIBd5v-Vxvaz_ua99UR1HqVRdehuoTJ_ocu1tLSuGE_UE9FqUBwDd1XC4FzcQz-2H4Emcn0bp48dSp7ZI8wolxgtG8XBPOQJsSo-IQawvH9n01kvStAdriZfFhyei9nqsKw/s320/2.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
g. Add a Log to History List activity, configure the log to write “Endless Loop – Ran”<br />
<br />
h. The complete workflow configuration should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghdQ5JOSIS1oSZnIuovTEJqb2-HJ2jSD2lOO-O_OuzPoNy357Hwpq6KmI6xqyWZdKt53TmTAXE0JU2TsUaE2-dRCIiuGmfhvbdKj9CU_YKZN1oAGMoObZvtxtZA9KLWzunnmAA-k9IYkk/s1600/3.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="101" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghdQ5JOSIS1oSZnIuovTEJqb2-HJ2jSD2lOO-O_OuzPoNy357Hwpq6KmI6xqyWZdKt53TmTAXE0JU2TsUaE2-dRCIiuGmfhvbdKj9CU_YKZN1oAGMoObZvtxtZA9KLWzunnmAA-k9IYkk/s320/3.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
i. From SharePoint Designer create a workflow that is associated with the Delay list and call it “Delay”<br />
<br />
j. Set this workflow to start automatically when a item is changed<br />
<br />
k. Create 1 step for the workflow, call it “Delay”<br />
<br />
l. Create a condition – If Created By is not empty<br />
<br />
m. Add a Do Calculation item, set it to Calculate Delay:Counter plus 1 (output to Variable: calc), the configuration should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnnEKC56ZhKRfVMaoxf1AoAGYaslaQNXhKsNHXnYPenDXvaigeoMiLSS5SdyjiT6nBPg9LqwQfuqh024amPyT5mnFtMTJLHGo5QX2_FMTq09ioiLh3bvKh_hTPw610blFFrtG5d1bbM0c/s1600/4.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="157" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnnEKC56ZhKRfVMaoxf1AoAGYaslaQNXhKsNHXnYPenDXvaigeoMiLSS5SdyjiT6nBPg9LqwQfuqh024amPyT5mnFtMTJLHGo5QX2_FMTq09ioiLh3bvKh_hTPw610blFFrtG5d1bbM0c/s320/4.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
n. Add a Pause for Duration activity, pause for 5 minute (this is only a place holder testing value that can be increased to whatever value is needed for the delay)<br />
<br />
o. Add an Update List Item activity, update the Endless Loop list, Endless Loop item, changing the value of Counter to the workflow calc variable’s value, configure the activity as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjQsOscGaI60lg-13_Ik5CVcSRv2tclV7ETezGKzvv0PieY072bvRuG_jdKb1duNvrNeTsj4gyHqBlL_3TB0csgkCG5BzNHD91t1MPSkxoyJOh4buj5qbbKXdpHS2m3peY2EU_Ry9hLPM/s1600/5.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjQsOscGaI60lg-13_Ik5CVcSRv2tclV7ETezGKzvv0PieY072bvRuG_jdKb1duNvrNeTsj4gyHqBlL_3TB0csgkCG5BzNHD91t1MPSkxoyJOh4buj5qbbKXdpHS2m3peY2EU_Ry9hLPM/s320/5.JPG" width="316" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
p. Add a Log to History List activity, configure the log to write “Delay – Ran”<br />
<br />
q. The complete workflow configuration should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoS-uyMTXngnBh-U071sHjOMbe7QAMsBqDN61MtcjeFdkcalEJLP1Z7L6QMjZo4SI-pAh8MwLtDqPrf3754Yfc38dhkNIzS3HQ25Z1cUiiGKZo2nVhL-36ufN96Ig2ksObudpME4cEPxU/s1600/6.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="117" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoS-uyMTXngnBh-U071sHjOMbe7QAMsBqDN61MtcjeFdkcalEJLP1Z7L6QMjZo4SI-pAh8MwLtDqPrf3754Yfc38dhkNIzS3HQ25Z1cUiiGKZo2nVhL-36ufN96Ig2ksObudpME4cEPxU/s320/6.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
5. Test the Workflows: To test the workflow we only need to start the Endless Loop workflow from our item in the Endless Loop list. After a while we will see that the two workflows will keep initiating each other forming an endless loop.<br />
<br />
6. Now Add Your Activity: Now you only need to add your activity to the loop, the best location being right after the Pause for Duration action in the Delay workflow. Once you add your activity here, it will run at the interval that you set in your Pause for Delay.<br />
<br />
7. References: Use SharePoint Designer to Email Daily Task Reminders</div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com36tag:blogger.com,1999:blog-3981477210525148311.post-47852173222816389652011-01-11T17:47:00.003-05:002011-11-03T16:30:07.224-04:00SharePoint Designer Workflows 2 – Developing a For Each Loop for Workflows<div dir="ltr" style="text-align: left;" trbidi="on">(For those using SharePoint 2010 please see my other post - <a href="http://sharepointgypsy.blogspot.com/2011/11/create-for-each-loop-for-workflows.html">Create a For Each Loop for Workflows Using SharePoint Designer 2010</a> - the technique described below will only work for SharePoint 2007)<br />
<br />
1. Introduction: Many times when designing workflows there is a need to use a “For Each Loop”. As you may know a For Each Loop will continue to process an action against a list of items until all items in the list have been processed. While present in all programming languages whether declared, script or object oriented, the For Each Loop is not present in SharePoint Designer workflows, or the other GUI driven workflow tools I know. This article will help you build a For Each Loop for your SharePoint Designer workflow.<br />
<br />
2. Scenario: In our simple scenario we want our workflow to run through each of several items in a list and to update each of the items Boolean “Processed” field from No to Yes (For Each list item update Processed field to Yes).<br />
<br />
3. Explanation: Essentially we will have two workflows, one to create and delete a new item in the “Loop” list, and the other to update the Data list. The logic for the first workflow looks like this:<br />
a. Create an item in the Loop list<br />
<br />
b. Pause (allowing the Loop list workflow to run)<br />
<br />
c. Delete the item created in Loop list<br />
<br />
The logic for the second workflow looks like this:<br />
<br />
a. Update the first item whose “Processed” field is set to No<br />
<br />
4. Overview: To build a For Each Loop we will need two SharePoint Lists, the first list will contain our data, and the second list will control the For Each Loop. For our example we will call the first list “Data” and the second list “Loop”. We will also need two SharePoint workflows, one, to create and delete items in the For Each Loop list, and one to update items in the Data list. To create the lists follow these steps:<br />
<br />
a. From the SharePoint site create a custom list, call it “Data”<br />
<br />
b. From the Data list add a custom Boolean column, call it “Processed”, set it’s default value to No and add it to the default view<br />
<br />
c. From the Data list create several list items<br />
<br />
d. From the SharePoint site create a second custom list, call it “Loop”<br />
<br />
e. From the Loop list create 1 item<br />
<br />
5. To create the workflows for these lists follow these steps:<br />
<br />
a. From SharePoint Designer create a workflow that is associated with the Loop list, call it “For Each loop”<br />
<br />
b. Set this workflow to start automatically when an item is created<br />
<br />
c. Create 1 step for the workflow, call it “For Each Loop”<br />
<br />
d. Create a condition – If Created By is not empty – this means the workflow will always run<br />
<br />
e. Add an Update List Item activity, configure the activity as shown below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs9ort6Odo9wsU-I1RtUE8USVet3c4A8N_b5yWv7TbcgarAXaNfUTrCrWaKd02qFN3eumDdyDPvdl-T4r_z5dmvAoeVf8m4tWQlSP4Q5l-EA1h5McfLsPpsqdgNAW5y4TNJ2ZBQKcTOUo/s1600/1.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs9ort6Odo9wsU-I1RtUE8USVet3c4A8N_b5yWv7TbcgarAXaNfUTrCrWaKd02qFN3eumDdyDPvdl-T4r_z5dmvAoeVf8m4tWQlSP4Q5l-EA1h5McfLsPpsqdgNAW5y4TNJ2ZBQKcTOUo/s320/1.JPG" width="277" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div>f. Add a Pause for Duration activity, configure the activity to pause for 1 minute<br />
<br />
g. Add a Log to History List activity, configure the log to write “For Each Loop – Ran”<br />
<br />
h. The complete workflow configuration should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdXIS_aaaH17aDvVo6xTo7lP_98IZ_XdDQ1L4Ko1sCSqX418N7kK7UoXomKQhA3D0NIsXbJo_vK0EPXfaxuuOidRSwRKdgJ515TSisozv0YxTWb1ur6_edv5TvpYlXJIap9jkvd7pHXe4/s1600/2.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="156" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdXIS_aaaH17aDvVo6xTo7lP_98IZ_XdDQ1L4Ko1sCSqX418N7kK7UoXomKQhA3D0NIsXbJo_vK0EPXfaxuuOidRSwRKdgJ515TSisozv0YxTWb1ur6_edv5TvpYlXJIap9jkvd7pHXe4/s320/2.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
i. From SharePoint Designer create a workflow that is associated with the Data list and call it “Process Data”<br />
<br />
j. Set this workflow to start automatically when a item is changed<br />
<br />
k. Create 1 step for the workflow, call it “Process Data”<br />
<br />
l. Create a condition – If Created By is not empty<br />
<br />
m. Create a second condition and Processed not equals No – this means the workflow will not run if the Processed equals no<br />
<br />
n. Add a Create List Item activity, create a new item in the Loop list, title the new item “New Loop Item”, and output to variable “idLoopListItem” of the type list ID, the activity should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCxCGlABDEn9LdJhPOx2shyxN8UDYlP4LmqO7BARrmJV8SnWdjtGM6G4a7B62ZY_OqH8ILu84lPmT0enFWWp-6mUTWsTFr_DODr0HL62Q1nV1pg_8CsH4JPEEscHpX5XYC8oWj1foX6xs/s1600/3.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="142" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCxCGlABDEn9LdJhPOx2shyxN8UDYlP4LmqO7BARrmJV8SnWdjtGM6G4a7B62ZY_OqH8ILu84lPmT0enFWWp-6mUTWsTFr_DODr0HL62Q1nV1pg_8CsH4JPEEscHpX5XYC8oWj1foX6xs/s320/3.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
o. Add a Pause for Duration activity, pause for 1 minute<br />
<br />
p. Add a Update List Item activity, update the current item in Data and change the value of Processed to No<br />
<br />
q. Add a Delete Item activity, and delete the item in the Loop list that has the same id as the idLoopListItem or the item you just created (by deleting the item we will keep this list from growing too large in the future). The configuration should appear as below: <br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4fIU1mJvj_kwfYA2hACwT63CvjZD9oMtI3V2jHqGNd7sZeQ0hkJp8vVF1qLSICL1E3-6LaEPnX15VY9CsYSGNPuWNyNqW_KqLTE2GK0Lu4f_D2AL-eMN2wBQQa4xMxryYLMvZqvwFsqo/s1600/4.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="285" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4fIU1mJvj_kwfYA2hACwT63CvjZD9oMtI3V2jHqGNd7sZeQ0hkJp8vVF1qLSICL1E3-6LaEPnX15VY9CsYSGNPuWNyNqW_KqLTE2GK0Lu4f_D2AL-eMN2wBQQa4xMxryYLMvZqvwFsqo/s320/4.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
r. Add a Log to History List activity, configure the log to write “Processed – Ran”<br />
<br />
s. The complete workflow configuration should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeSliyLnA6fFJESaSLf3hwDR8YulfnHS9uqWZ93c87Bc00FH9_ynSaH65G6Cuj4PsK9GAerg4qoJrjmdIPLa2k8G6NdSyZEvuo6YzrZfyG0CFlqYlJeMu_PmZ6dsX_i2oepDDCSPBJJp0/s1600/5.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="174" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeSliyLnA6fFJESaSLf3hwDR8YulfnHS9uqWZ93c87Bc00FH9_ynSaH65G6Cuj4PsK9GAerg4qoJrjmdIPLa2k8G6NdSyZEvuo6YzrZfyG0CFlqYlJeMu_PmZ6dsX_i2oepDDCSPBJJp0/s320/5.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
6. Test the Workflows: To test the workflow we only need to start the For Each Loop workflow from our item in the Loop list.<br />
<br />
7. Error Messages: The last item created in the Loop list will have an error occurred in the workflow metadata field. This is because the last item to start cannot find any items that have not been processed. This error can be ignored; it’s part of the normal processing and will eventually be deleted by the Process Data workflow.<br />
<br />
8. Thanks: I want to acknowledge Ricky Spears for his article “<a href="http://sharepointsolutions.blogspot.com/2008/05/looping-through-items-in-sharepoint.html">Looping through Items in a SharePoint List with SharePoint Designer Workflows</a>”, which provided the technique that I describe in this article.</div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com18tag:blogger.com,1999:blog-3981477210525148311.post-90336395176837480622011-01-10T15:29:00.000-05:002011-01-10T16:42:03.454-05:00SharePoint Designer 2007 Workflows 1 – Best Practice Solution for Logging Runtime Workflow Errors<strong>1. Introduction:</strong> When employing SharePoint Designer 2007 Workflow (SPDWF) applications it is very important to be able to identify, log and track runtime workflow errors. Typical requirements for this type of solution include the following:<br />
<br />
a. Automatic alerts when errors occur – when a workflow error occurs the user will need to be alerted immediately<br />
<br />
b. One location error logging – when a workflow error occurs the user will want to go to one location where workflow error information is logged<br />
<br />
c. Workflow error step identification – when a workflow error occurs the user will want to go be able to identify which workflow step caused the error<br />
<br />
This article will help you develop a best practice solution for logging runtime workflow errors that meets all these requirements.<br />
<br />
2. <strong>Overview:</strong> As an overview let’s first discuss the types of SharePoint Designer Workflow (SPDWF) error logging available to us, the types are listed below:<br />
<br />
a. List Item Error Logging: When a SPDWF error occurs that error is logged to the list item’s metadata, and appears as the message “Error Occurred”.<br />
<br />
b. Workflow History Error Logging: When a SPDWF error occurs that error is logged to the workflow history for that item, and appears as a variety of messages depending on the error that occurred.<br />
<br />
c. Custom Workflow Logging: With properly designed custom workflow logging, the step in which an error occurred in a SPDWF can easily be identified.<br />
<br />
<strong>3. Best Practice:</strong> So to develop our runtime error logging best practice solution we will need to use all three types of error logging capabilities available to us as well as some other out of the box (OOTB) SharePoint capabilities. Our solution will have the following components:<br />
<br />
a. Automatic Alerts: We will create a workflow dashboard that alerts an identified user when a workflow error occurs.<br />
<br />
b. Workflow History Error Logging: We will leverage the OOTB capabilities of SPDWF error logging to point the user to one error logging location. <br />
<br />
c. Workflow Error Step Identification: We will develop a custom workflow log that helps to identify the workflow step that caused the error. (This log will be written to the same location as the OOTB workflow error log).<br />
<br />
While the requirements of the solution appear in the order the user will experience them, the design and build for the solution will occur in the opposite order, and so we will discuss the solution components in this order.<br />
<br />
<strong>4. Design the List and Workflow:</strong> For our solution we will develop a very simple list and workflow, just as a straw man to use to illustrate our logging design. The workflow will have three steps, each step with one condition, and two actions. We will use the first step to establish the context of the error (i.e. step one will not cause an error), and we will use the second step to identify an error (i.e. step two will cause an error), and we will use the third step to establish whether or not the workflow completed. Here are the steps to creating our list and workflow:<br />
<br />
a. From the SharePoint suite create a new custom list, call it “Workflow Log List”<br />
<br />
b. From “Workflow Log List” create a new custom text column, call it “Force Workflow Log Error”, click on “Add to default view” and click OK<br />
<br />
c. From “Workflow Log List” create a new custom Boolean column, call it “Workflow Ran”, click on “Add to default view” and click OK<br />
<br />
d. From Workflow Log List create two items, for item 1 in the list set the title to “Title 1”, and then set the “Force Workflow Log Error” column to “No Error”, and for item 2 in the list set the title to “Title 2”, and then set the “Force Workflow Log Error” column to “Error”<br />
<br />
e. From SPD, create a new custom workflow for the Workflow Log list, call it “Workflow Log”<br />
<br />
f. From the “Define your new workflow” screen of the “Workflow Log” workflow set the workflow start options to “Allow this workflow to be manually started from an item”, and “Automatically start this workflow when a new item is created”<br />
<br />
g. From Workflow Log workflow, create a workflow step, call it “Workflow Step 1”<br />
<br />
h. From Workflow Step 1, create one condition – “If Created By is not empty” – this step will run whenever a list item exist<br />
<br />
i. From Workflow Step 1, create two actions – “Update item in this list” and “Log this message to the workflow history list”<br />
<br />
j. From the Update item in this list action add logic to update the current item in the list so that the value of our custom text column “Title” is set to “Update Title”<br />
<br />
k. From the Log this message to the workflow history list action add logic to write “Workflow Step 1 - Ran” to the History log<br />
<br />
l. From Workflow Log workflow, create a second workflow step, call it “Workflow Step 2”<br />
<br />
m. From Workflow Step 2, create one condition – “If Created By is not empty” – this step will run whenever a list item exist<br />
<br />
n. From Workflow Step 2, create two actions – “Update item in this list” and “Log this message to the workflow history list”<br />
<br />
o. From the Update item in this list action add logic to update the current item in the list so that the value of our custom text column “Force Workflow Log Error” is set to “Force Error”<br />
<br />
p. From the Log this message to the workflow history list action add logic to write “Workflow Step 2 - Ran” to the History log<br />
<br />
q. From Workflow Log workflow, create a third workflow step, call it “Workflow Step 3”<br />
<br />
r. From Workflow Step 3, create one condition – “If Created By is not empty” – this step will run whenever a list item exist<br />
<br />
s. From Workflow Step 3, create two actions – “Update item in this list” and “Log this message to the workflow history list”<br />
<br />
t. From the Update item in this list action add logic to update the current item in the list so that the value of our custom Boolean column “Workflow Ran” is set to “Yes”<br />
<br />
u. From the Log this message to the workflow history list action add logic to write “Workflow Step 3 - Ran” to the workflow history list<br />
<br />
5. <strong>Design the Workflow Dashboard:</strong> In addition to our list and workflow we want to design a workflow dashboard, the purpose of the dashboard is to tell us whenever an error occurs in the workflow.<br />
<br />
a. From the site create a custom list, call it “Workflow Dashboard”<br />
<br />
b. From the Workflow Dashboard list click on Site Actions -> Edit Page<br />
<br />
c. From the Edit Page view click on “Add a Web Part”<br />
<br />
d. From the Add Web parts dialogue box choose Workflow Log List and then click Add – the Workflow Log List web part will be added<br />
<br />
e. Click on the Workflow Dashboard web parts Edit menu and choose Delete – we will not need this list’s default web part<br />
<br />
f. From the toolbar of the Workflow Log List web part choose Actions -> Alert Me, this will take you to the New Alert view<br />
<br />
g. From the New Alert view accept all the default settings by clicking OK – This will create an Alert that is generated every time there is a change in any of the Workflow Log List items <br />
<br />
<strong>6. Test the Solution Workflow – No Error:</strong> Now we are ready to test our workflow and demonstrate a simple logging message. Follow these steps to test the workflow and generate the logging message:<br />
<br />
a. From the Workflow Log List, item 1 (Title 1), click on the list item drop down menu and choose the Workflows menu item<br />
<br />
b. From the workflows view page, click on the “Workflow Log” item<br />
<br />
c. From the workflow initiation page click on the “Start” button<br />
<br />
d. When you are returned to the list item view page you should see the message “Completed” under the Workflow Log column. <br />
<br />
e. Click on the “Completed” link under the Workflow Log column and you will be taken to the Workflow Status page<br />
<br />
f. On the Workflow Status page under the “Workflow History” page you will find our three custom log entries:<br />
<br />
i. Workflow Step 1 – Ran<br />
<br />
ii. Workflow Step 2 – Ran<br />
<br />
iii. Workflow Step 3 – Ran<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsq4i6oGnhEfPvRC8oNpGEzxeqAP1De6BZXqbk-lqSdp140snB19RnLwiktwqqdFrQGZI1jVKuA-2kkJml1EXjSe7-NKKWlZseXeO2z5TnlQCiJiSCrM3qOlNVO5vjTjV9YukfWvjWyYY/s1600/SPDWF1.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="87" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsq4i6oGnhEfPvRC8oNpGEzxeqAP1De6BZXqbk-lqSdp140snB19RnLwiktwqqdFrQGZI1jVKuA-2kkJml1EXjSe7-NKKWlZseXeO2z5TnlQCiJiSCrM3qOlNVO5vjTjV9YukfWvjWyYY/s320/SPDWF1.JPG" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div> g. You will receive an Alert like the one below, this alert informs you that something has changed in the Workflow Log List, <em><u>notice that the Workflow Ran field has an entry - “Yes”</u></em><br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEickRvwmTzAzg4nQu_AhNBwH5FUt8U2mYFtewWceT2JQ1Y4Wr-LzWUPbhtwQ_FWKIpomps2VK1f92i-cPMqnx2IT5uTr2BBJXa44_m4Da3TjPBz82HzjLhafhMQD7snlI1BlioNipzknLI/s1600/SPDWF2.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="89" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEickRvwmTzAzg4nQu_AhNBwH5FUt8U2mYFtewWceT2JQ1Y4Wr-LzWUPbhtwQ_FWKIpomps2VK1f92i-cPMqnx2IT5uTr2BBJXa44_m4Da3TjPBz82HzjLhafhMQD7snlI1BlioNipzknLI/s320/SPDWF2.JPG" width="320" /></a><br />
<div class="separator" style="clear: both; text-align: center;"><br />
</div>7. <strong>Test the Solution Workflow – Error:</strong> Now we are ready to test our workflow error logging by forcing a simple error to occur. Follow these steps to test the workflow and generate the logging message:<br />
<br />
a. From the Workflow Log List tool bar, click on Settings, List Settings<br />
<br />
b. From the Workflow Log List settings page, under the Columns heading, click on the Force Workflow Log Error column <br />
<br />
c. From the Force Workflow Log Error column’s edit column page, at the bottom find the Delete button and click on it, and then choose OK when the warning message appears – This will delete our Force Workflow Log Error column and therefore force our workflow to throw an error when it attempts to update this column<br />
<br />
d. From the Workflow Log List, item 2 (Title 2), click on the list item drop down menu and choose the Workflows menu item<br />
<br />
e. From the workflows view page, click on the “Workflow Log” item<br />
<br />
f. From the workflow initiation page click on the “Start” button<br />
<br />
g. When you are returned to the list item view page you should see the message “Error Occurred” under the Workflow Log column<br />
<br />
h. Click on the “Error Occurred” link under the Workflow Log column and you will be taken to the Workflow Status page<br />
<br />
i. On the Workflow Status page under the “Workflow History” page you will find the following three log entries:<br />
<br />
i. Error updating a list item: This is the message concerning the cause of the error – our error was caused by a problem that prevented the update of a list item<br />
<br />
ii. Workflow Step 1 – Ran: This is the last step of the workflow that ran successfully<br />
<br />
iii. An error has occurred in Workflow Log: This is where the error occurred, by interpretation we know we this is Step 2 because step 1 ran successfully but Step 2 did not<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKmnVd1GJUnZUUDIe05QFBJVsXXsCT6Ipzp-4tvIuSJ0nrcNQlSrRb-5K0CVxszyN3z7dK7bwP_CRN2FJu2mBYW5bJKLjl2736a-w1tDdUuq4_bKdNHl2FRDPRsGwVjzk_i0yurrzrLHM/s1600/SPDWF3.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="71" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKmnVd1GJUnZUUDIe05QFBJVsXXsCT6Ipzp-4tvIuSJ0nrcNQlSrRb-5K0CVxszyN3z7dK7bwP_CRN2FJu2mBYW5bJKLjl2736a-w1tDdUuq4_bKdNHl2FRDPRsGwVjzk_i0yurrzrLHM/s320/SPDWF3.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
j. You will receive an Alert like the one below, this alert informs you that something has changed in the Workflow Log List, <em><u>notice that the Workflow Ran field has an entry - “No”</u></em><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdiCqZfXFvwjyxpaNsXQRAkI9CB48xJpVrztXKtw6Qeho9bC2beIKJ7Yo4hsX6M-ro_i7dyoB8wUhBKG1tmzNwQsSXX6lDVGONpxd9UkFf_uwBHfyS2yS6k7ZqnIAGezqxLFkyS7x0TWg/s1600/SPDWF4.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="104" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdiCqZfXFvwjyxpaNsXQRAkI9CB48xJpVrztXKtw6Qeho9bC2beIKJ7Yo4hsX6M-ro_i7dyoB8wUhBKG1tmzNwQsSXX6lDVGONpxd9UkFf_uwBHfyS2yS6k7ZqnIAGezqxLFkyS7x0TWg/s320/SPDWF4.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<strong>8. Review of Our Design:</strong><br />
<br />
a. Workflow Error Step Identification – Custom Error Logs: SPDWF provide many useful conditions and actions, but for our best practice solution, one action is not only useful, it is essential - the “Log to History List” action. In our solution we ensured that each workflow step had a log that identified 1.) The workflow step name and 2.) The workflow step condition <br />
<br />
b. Workflow History Error Logging – OOTB SPDWF Error Logging: By combining the OOTB SPDWF error logging with our custom logging, we are able to easily identify at which step the workflow failed<br />
<br />
c. Automatic Alerts – Workflow Dashboard: By developing a custom workflow Dashboard we were able to alert the user to when a workflow failed<br />
<br />
<strong>9. More Advanced Design:</strong> In addition to our rather simple alert system we can develop a more advanced alert system that sends a detailed error message with the list item ID, time of error, error message, last successful workflow step, etc. To implement this type of functionality will require developing a custom SharePoint event handler, however, this type of handler would be very useful and very reusable. I won’t cover how to develop that workflow event handler here, but maybe in future articles.<br />
<br />
<strong>10. Conclusion:</strong> By combining both the OOTB SPDWF error logging system, with custom SPDWF logging and custom Alerts we are able to quickly and easily identify, log and track workflow errors.Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-14319482928071053072010-12-28T10:30:00.000-05:002011-01-04T09:34:44.506-05:00Why You Should Try The New Sharepoint Designer 2010 WorkflowsIf your organization hasn't tried the new SharePoint Designer (SPD) 2010 workflow capabilities, this blog may help you make a strong case as to why they should:<br />
<br />
<strong>Cost:</strong> SPD workflows are built with SPD 2007 and SPD 2010, both of which free products<br />
<br />
<strong>ROI:</strong> SPD 2007/2010 workflows leverage your existing investment in SharePoint<br />
<br />
<strong>Support:</strong><br />
<br />
<ul><li><u>Books</u>: There are many professional books available to help guide the SPD WF developer</li>
<li><u>Blogs</u>: There are many professional blog sites available to help guide the SPD WF developer</li>
<li><u>Forums</u>: There are many professional forums available to help guide the SPD WF developer</li>
<li><u>Community</u>: There are hundreds of professional SPD WF developers</li>
<li><u>Vendor</u>:</li>
</ul> - Microsoft provides abundant tutorials, virtual labs, and technical articles<br />
- Microsoft responds rapidly to any technical issues with patches and updates<br />
- Microsoft can provide advance trouble shooting for this product<br />
<br />
<strong>Ease of Use:</strong> <br />
<br />
• Graphical Design Tool: SharePoint Designer has a powerful yet intuitive workflow editor in SharePoint Designer 2010 that allows nested logic, sub steps, and more. For a quick “How To” see this article - <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/introduction-to-designing-and-customizing-workflows-HA101859249.aspx#_Toc261009031">Introduction to Designing and Customizing Workflows</a><br />
<br />
• Task Actions:<br />
<br />
o Task Actions: SPD 2010 includes new task actions that you can use to model all sorts of business workflows in your organization. This creates tremendous flexibility – you can edit and customize almost any aspect of the task process (For example, the default settings in a task process mean that approval must be unanimous by all workflow participants, but you can change this so that approval means a simple majority or even a certain percentage, such as seventy percent) <br />
<br />
o For a quick “How To” see this article - <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/introduction-to-designing-and-customizing-workflows-HA101859249.aspx#_Toc261009031">Introduction to Designing and Customizing Workflows</a><br />
<br />
• Conditions:<br />
<br />
o Conditions Support Multiple Workflow Scenarios: SPD WF support conditions that can be used with an Impersonation step, Content Type Workflows, or Site workflows<br />
<br />
o For a Complete Listing of Conditions see - <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/workflow-conditions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376962.aspx">Workflow Conditions In Sharepoint Designer 2010 a Quick Reference Guide</a><br />
<br />
• Actions:<br />
<br />
o Actions Supporting Multiple Workflow Scenarios: SPD WF’s provide a set of conditions that can be used with Core Actions, Document Set Actions, List Actions, Relational Actions, Task Actions, Task Behavior Actions, and Utility Actions<br />
<br />
o For a Complete Listing of Conditions see - <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/workflow-actions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376961.aspx">Workflow Conditions In Sharepoint Designer 2010 a Quick Reference Guide</a><br />
<br />
<strong>Microsoft Visio - Graphical Design Tool:</strong><br />
<br />
• With Microsoft Visio Premium 2010, you can create a workflow in Visio and then export it to Microsoft SharePoint Designer 2010<br />
<br />
• For a quick “How To” see this article - <a href="http://office.microsoft.com/en-us/visio-help/create-import-and-export-sharepoint-workflows-in-visio-HA101888007.aspx">Create Import and Export Sharepoint Workflows in Visio</a><br />
<br />
<strong>SPS 2010 OOTB Workflows: </strong><br />
<br />
• Common Design Tool: SPS 2010 OOTB workflows can be extended by using the same SPD WF design tools that are used to create a SPD WF from Scratch<br />
<br />
• Reusable Design: A SPS 2010 OOTB workflow that is extended using SPD will be reusable because it will be created as a Content Type Workflow and can be deployed across other sites, site collections and farms using a solution package (.wsp file)<br />
<br />
• Advance Customization with Visual Studio: An SPS 2010 OOTB workflow that is extended using SPD can be even further extended by importing the SPD WF into Visual Studio<br />
<br />
<strong>Visual Studio WF: </strong><br />
<br />
• Import SPD WF: Visual Studio 2010 has the ability to import a .wsp package from a SPD WF as a Visual Studio workflow project, therefore, SPD WF designs can be reused and extended by using Visual Studio 2010<br />
<br />
• For a quick “How To” see this article - <a href="http://msdn.microsoft.com/en-us/library/ee231580.aspx">Walkthrough: Import a SharePoint Designer Reusable Workflow into Visual Studio</a><br />
<br />
<br />
<strong>List Workflows:</strong><br />
<br />
• List\Library: A list workflow is the type of workflow that was available in SharePoint 2007, and because it has the context of the list or library for which it was created, list workflows automatically have access to the values of the custom fields for the list item on which they will run <br />
<br />
• Not Reusable: List workflows cannot be made available to other lists or libraries on the site they were created on or on other sites<br />
<br />
• Custom Fields: If you know that you will only need the workflows you are designing for a specific list, the list workflow has the advantage of automatically making available the custom fields of the lists<br />
<br />
<strong>Reusable List Workflows:</strong> <br />
<br />
• Site: You can create a reusable list workflow in the top-level site in the site collection, and that workflow can be associated to any list, library, or content type in the site collection<br />
<br />
• Subsite: You can also create a reusable list workflow in any subsite in the site collection; this workflow is available for reuse anywhere in that particular subsite<br />
<br />
• Export as a Template: You can export a reusable list workflow as a template from one site and then upload and activate that workflow template in a different site <br />
<br />
• Common Columns: Reusable list workflows, by default, don’t have the context of a specific list or library, therefore, they provide only the columns that are common across lists and libraries such as Content Types, but reusable SPD WF’s are not limited to Content Types<br />
<br />
• Associated Columns: If your reusable workflow requires certain columns to be present in the list or library that you associated it to, you can add those columns as association columns (association columns get added automatically to a list or library when a reusable workflow is associated to that list or library)<br />
<br />
• Ease of Deployment: A reusable list workflow can be deployed across other sites, site collections and farms using a solution package<br />
<br />
• Advance Customization with Visual Studio: A reusable list workflow can highly modified and extended because it can be imported into Visual Studio 2010<br />
<br />
• For a quick “How To” see this article -<a href="http://technet.microsoft.com/en-us/library/ff607861.aspx">Create a site workflow and modify its form using InfoPath Forms 2010</a><br />
<br />
<strong>Site Workflows:</strong><br />
<br />
• Site Level: A site workflow is associated to a site — not to a list, library, or content type so unlike most workflows, a site workflow is not running on a specific list item (because of this, many of the actions that are available for items are not available for site workflows)<br />
<br />
• Example Scenario: For example, you can create a site workflow as a way for people to provide feedback about your site<br />
<br />
• For a quick “How To” see this article — <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/introduction-to-designing-and-customizing-workflows-HA101859249.aspx">Introduction to designing and customizing workflows</a><br />
<br />
<strong>Deployment:</strong> <br />
<br />
• Deploy Directly: <br />
<br />
o You can directly associate a SPD WF with a list, library, content type, or site<br />
<br />
o For a quick “How To” see this article - <a href="http://technet.microsoft.com/en-us/library/cc298653.aspx">Workflow deployment process (SharePoint Server 2010)</a><br />
<br />
• WSP Files: <br />
<br />
o You can deploy a SPD WF as a workflow template (.wsp file). The .wsp file can then be used to deploy the workflow on multiple sites and site collections<br />
<br />
o For a quick “How To” see this article - <a href="http://technet.microsoft.com/en-us/library/ff608051.aspx">Deploy a workflow as a WSP file (SharePoint Server 2010)</a><br />
<br />
<strong>Visio Integration:</strong><br />
<br />
• Two Way Integration: <br />
<br />
o To or From SPD: In Microsoft SharePoint Designer 2010, you can import a workflow created in Microsoft Visio Premium 2010 or export a workflow to Visio for viewing<br />
<br />
o For a quick “How To” see these articles - <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/transfer-workflows-between-sharepoint-designer-and-visio-HA101890958.aspx">Transfer workflows between SharePoint Designer and Visio</a><br />
<br />
• SPD WF Template Shapes:<br />
<br />
o WF Templates: Visio Premium provides SPD WF Templates that not only allow BA’s to design detailed workflow flow charts, but also allow the SharePoint Designer to quickly convert and deploy those workflows<br />
<br />
o For a quick “How To” see this article - <a href="http://office.microsoft.com/en-us/visio-help/sharepoint-workflow-template-shapes-guide-HA101903894.aspx">SharePoint Workflow template shapes guide</a><br />
<br />
• Ease of Conversion:<br />
<br />
o Click Button Conversion: Workflow designs created in Visio Premium 2010 can be converted to SPD WF’s with only a few clicks – Import Workflow, Name Workflow, Identify Workflow Type<br />
<br />
o For a quick “How To” see this article - <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/transfer-workflows-between-sharepoint-designer-and-visio-HA101890958.aspx">Transfer workflows between SharePoint Designer and Visio</a><br />
<br />
• Workflow Visualization:<br />
<br />
o Track the Progress of the Workflow Visually: Using SharePoint Designer 2010, you can enable workflow visualization on the workflow status page – this enables users to see the workflow in progress!<br />
<br />
o For a quick “How To” see this article - <a href="http://office.microsoft.com/en-us/sharepoint-designer-help/transfer-workflows-between-sharepoint-designer-and-visio-HA101890958.aspx">Transfer workflows between SharePoint Designer and Visio</a><br />
<br />
<strong>InfoPath Integration:</strong><br />
<br />
• Workflow Forms:<br />
<br />
o Advanced Workflow Forms: You can use Microsoft InfoPath 2010 to create advanced forms for SPD workflows<br />
<br />
o Design Once – Use Many: Because you are using InfoPath with SPD WF’s, developers won’t have to create two separate forms, one for use on the server and one for use in the client (InfoPath 2010 gives you the ability to create symmetrical forms; that is, forms that look and operate exactly the same whether they are displayed in the SharePoint Server 2010 Web interface or within a Microsoft Office 2010 client application)<br />
<br />
o For a quick “How To” see this article - <a href="http://msdn.microsoft.com/library/ms573938(office.14).aspx">InfoPath Forms for Workflows</a><br />
<br />
• Client Based Forms Driven Applications with Workflow: <br />
<br />
o Client/Server Applications: Client based InfoPath applications can use SPD 2010 WF’s to provide a tightly integrated client/server workflow capability<br />
<br />
o For a quick “How To” see this article - <a href="http://go.microsoft.com/fwlink/?LinkID=190499&clcid=0x409">InfoPath 2010 Enhanced Integration with SharePoint Server 2010 and Its Implications When Designing Forms for Applications</a>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-48478199098087125262010-12-15T17:14:00.000-05:002010-12-15T17:19:03.830-05:00Create a Custom Content Type1. When your organization begins to use SharePoint 2007 or 2010, sooner or later they will want to discuss the subject of Content Types – What are they? When should they be used? How do we make custom content types? In this article I will try to answer those questions as well as take you through the step-by-step process of making a custom content type.<br />
<br />
2. Microsoft provides the following discussion of Content Types:<br />
<br />
“A content type is a reusable collection of metadata (columns), workflow, behavior, and other settings for a category of items or documents in a Microsoft SharePoint list or document library. Content types enable you to manage the settings for a category of information in a centralized, reusable way.<br />
<br />
For example, imagine a business situation in which you have three different types of documents: expense reports, purchase orders, and invoices. All three types of documents have some characteristics in common; for one thing, they are all financial documents and contain data with values in currency. Yet each type of document has its own data requirements, its own document template, and its own workflow. One solution to this business problem is to create four content types. The first content type, Financial Document, could encapsulate data requirements that are common to all financial documents in the organization. The remaining three, Expense Report, Purchase Order, and Invoice, could inherit common elements from Financial Document. In addition, they could define characteristics that are unique to each type, such as a particular set of metadata, a document template to be used in creating a new item, and a specific workflow for processing an item.<br />
<br />
You can use each of the content types in this example on any document library in the site hierarchy, and you can use all of them together on the same document library. When business requirements change, you can modify the content types to meet the new requirements and push down the updates to any document library where the content type is used.”<br />
<br />
<a href="http://msdn.microsoft.com/en-us/library/ms472236.aspx">http://msdn.microsoft.com/en-us/library/ms472236.aspx</a><br />
<br />
3. From this discussion we can derive the basic characteristics of Content Types:<br />
<br />
a. They are reusable<br />
<br />
b. They are a collection of metadata (columns)<br />
<br />
c. Workflow, behavior, and other settings can be assigned to them<br />
<br />
d. They can be centrally managed<br />
<br />
e. Their settings can be inherited by other Content Types<br />
<br />
f. They can be used throughout the site collection<br />
<br />
g. Changes to a Content Type can be pushed to any lists that are using it<br />
<br />
4. So now we need to create a custom content type for our new SharePoint application. Here is our scenario:<br />
<br />
• The customer receives help request e-mails from various users <br />
<br />
• The customer wants to receive these requests in his SharePoint site so he can use workflow and collaboration to develop, track, and monitor responses<br />
<br />
• The customer will need to use a custom e-mail enabled SharePoint library<br />
<br />
• When the e-mails arrive the SharePoint site must capture certain information from the e-mail itself as well as other calculated information from an event handler<br />
<br />
• The customer will not directly create e-mail documents in the list, SharePoint will create the documents automatically when an e-mail arrives<br />
<br />
• Below are the metadata fields the custom Content Type for our library must have:<br />
<br />
o EmailID – Number<br />
<br />
o Title – Single Line of text<br />
<br />
o Date Received – Date and Time<br />
<br />
o Due Date – Date and Time<br />
<br />
o Reply Status – Choice <br />
<br />
o E-mail Sender – Single Line of Text<br />
<br />
o E-mail From – Single Line of Text<br />
<br />
o E-mail To – Single Line of Text<br />
<br />
o E-mail CC – Single Line of Text<br />
<br />
o E-mail Subject – Single Line of Text<br />
<br />
o E-mail Body – Multiple Lines of Text<br />
<br />
o Event Log – Multiple Lines of Text<br />
<br />
o DueDateNoTime – Calculated<br />
<br />
o ReceivedDateNoTime – Calculated<br />
<br />
• The Content Type will also have a workflow associated with it – the “Inbox” workflow<br />
<br />
5. So, to begin with, we need to create a blank Content Type which we can then customize with the columns we need. Below are the steps for creating a custom content type:<br />
<br />
• From the site’s front page, choose Site Actions -> Site Settings <br />
<br />
• From the Site Settings page, under the Galleries heading, choose Site Content Types <br />
<br />
• From the Site Content Type Gallery click on the Create Button <br />
<br />
• From the New Site Content Type page, in the Name and Description section, provide a name and Description for the content type – we will use “Custom Inbox” as the name <br />
<br />
• From the New Site Content Type page, in the Name and Description section, choose Parent Content Type from - we will use Document Content Types<br />
<br />
• From the New Site Content Type page, in the Name and Description section, choose Parent Content Type – we will use Document <br />
<br />
• From the New Site Content Type page, in the Group section, choose which group you want your content type to reside in - we will choose Existing Group: Custom Content Type<br />
<br />
• Click the OK button <br />
<br />
6. Next, we create the custom content type columns. (All the columns will be new custom site columns except Due Date, because this column already exists and its format is fine for our needs.) Below are the steps for adding a custom column:<br />
• From the Site Content Type: Custom Inbox configuration page , under the columns heading, choose “Add from new site column”<br />
<br />
• From the New Site Columns: Solutions page provide the name, field type, and pertinent information for each metadata item<br />
<br />
• For each metadata item choose to Put this site column into: Existing group: Custom Columns<br />
<div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvh0rlbnbZDYM9vMKFWUpIii46NbXv4mWwAZpeX08lIq2Hug6LAwNtyfqdUH9AhKOwIHWO7-DnUSCvw2H7uXLOMqLgFzOixF9uRUO1ZcHS0DPZFUyT9hTGmBJ-mRM1jI4vjU2FdWpXz88/s1600/1.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="50" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvh0rlbnbZDYM9vMKFWUpIii46NbXv4mWwAZpeX08lIq2Hug6LAwNtyfqdUH9AhKOwIHWO7-DnUSCvw2H7uXLOMqLgFzOixF9uRUO1ZcHS0DPZFUyT9hTGmBJ-mRM1jI4vjU2FdWpXz88/s320/1.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
• In the Update List and Site Content Types section, choose No for the Update all content types inheriting from this type? Configuration<br />
<br />
<div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7jtPTfIaqQuOQlAexW66CVu8ZVys6fVmXeiJDOtUDqJt5tBJ9q2wjWPTuPyhz2h-ib0t-ddRcp6hOMdqgH4o-CK8yBebJHaMo1IgyFn0CUj1WpDkNiiqZtU0VqDvhMH1bNXwYni0P-X8/s1600/2.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="59" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7jtPTfIaqQuOQlAexW66CVu8ZVys6fVmXeiJDOtUDqJt5tBJ9q2wjWPTuPyhz2h-ib0t-ddRcp6hOMdqgH4o-CK8yBebJHaMo1IgyFn0CUj1WpDkNiiqZtU0VqDvhMH1bNXwYni0P-X8/s320/2.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
• Click OK<br />
<br />
7. There is one existing site column to add, Due Date. Below are the steps for adding an existing site column:<br />
<br />
• From the Site Content Type: Custom Inbox configuration page , under the columns heading, choose “Add from existing site column”<br />
<br />
• From the Select Columns section, choose select columns from “All Groups”, Available Column “Due Date”, and choose Add<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhND6qtvq-b8IhWfBt_EorUqh13kYGjL1PGpj5IHjSv_jEoQviV1CFaYuqSNXKB8f9tRMz_kjczUctImYXDXzlI9QpHxTrkrJhrQnbBHGJ0RvII3Uo8oAUypjKCMlkFBVwD1WUtyzijUHg/s1600/3.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="111" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhND6qtvq-b8IhWfBt_EorUqh13kYGjL1PGpj5IHjSv_jEoQviV1CFaYuqSNXKB8f9tRMz_kjczUctImYXDXzlI9QpHxTrkrJhrQnbBHGJ0RvII3Uo8oAUypjKCMlkFBVwD1WUtyzijUHg/s320/3.JPG" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div>• From the Update List and Site Content Types section, Update all content types inheriting from this type? selection choose No<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4MUu7lRyE-d2tTLP1nXtqmVOrfgt3-X6E-fbUbtNdyNXdEtyUC873Ff8kOLYNozChA5hZ1YyqfAc9_1Mn2tBUExRk6tQ8NGihw-ed-0EVY4PnISGzs8EGMDQWrrpqEXdRMeVyJNj6kW0/s1600/4.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="61" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4MUu7lRyE-d2tTLP1nXtqmVOrfgt3-X6E-fbUbtNdyNXdEtyUC873Ff8kOLYNozChA5hZ1YyqfAc9_1Mn2tBUExRk6tQ8NGihw-ed-0EVY4PnISGzs8EGMDQWrrpqEXdRMeVyJNj6kW0/s320/4.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
<br />
8. Our next step is to associate a SharePoint workflow with our custom content type. To do this we need to accomplish two actions – Removing the workflows we don’t want associated with the Content Type, and adding the workflow we do want associated. To remove the workflows we don’t want associated follow these steps:<br />
<br />
• From the Site Content Type: Custom Inbox configuration page , under the settings heading, click on workflow settings<br />
<br />
• From the Change Workflow Settings page, under workflows, choose Remove a Workflow<br />
<br />
• From the Remove Workflows page, choose to remove the Approval, Collect Feedback, and Collect Signatures workflows<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFHzY_NS79jVvp32eu6mRDxSkqAoD9l3OlosKNCL1N7M2fPwXhHmKhrSdmDAVRDNY4_7SDLhDPI-wvn3X4gGTHFxdUEM8uPnfMrwTISkH9fyzCywXASC_ha181o9UpdYIDNc2yHwAOO20/s1600/5.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="56" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFHzY_NS79jVvp32eu6mRDxSkqAoD9l3OlosKNCL1N7M2fPwXhHmKhrSdmDAVRDNY4_7SDLhDPI-wvn3X4gGTHFxdUEM8uPnfMrwTISkH9fyzCywXASC_ha181o9UpdYIDNc2yHwAOO20/s320/5.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
• Now click OK<br />
<br />
• The three default workflows will now be removed<br />
<br />
9. To add an association for our custom workflow follow these steps:<br />
<br />
• From the Site Content Type: Custom Inbox configuration page , under the settings heading, click on workflow settings<br />
<br />
• From the Change Workflow Settings page, under workflows, choose Add a Workflow<br />
<br />
• From the Add a Workflow page, in the workflow section, choose to add the ContactUsInbox workflow<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNuxjG_P95ePBehv6jqj1nGs49miRezLpv19Hyz_wmNAKH6ETYCujqXgVpordxPdrgbpQAbwyZv5YCR4z4OUVcvnJT_yR2LWeVfNi6cw7mjnfic3rczHA38J1GrMGMlcb5SuGa-rh4pQs/s1600/6.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="45" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNuxjG_P95ePBehv6jqj1nGs49miRezLpv19Hyz_wmNAKH6ETYCujqXgVpordxPdrgbpQAbwyZv5YCR4z4OUVcvnJT_yR2LWeVfNi6cw7mjnfic3rczHA38J1GrMGMlcb5SuGa-rh4pQs/s320/6.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
• Name the workflow - Contact Us Inbox Workflow<br />
<br />
• In the Start Options section choose Allow this workflow to be manually started by an authenticated user with Edit Items Permissions and Start this workflow when a new item is created<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnfccQhZNub5eKbOm_lnpQYRCYMhuy0Mlk7hTIXQDeH_CISipZiYtdvjSbc3Q3GiS2XgdLaHZMDCL6oV9gf6QPorVu-tOcxROGfSeJrj-6UeK5jN8QaPVwqxyBwTa4OWh3-m5lfNSs-qE/s1600/7.JPG" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="52" n4="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnfccQhZNub5eKbOm_lnpQYRCYMhuy0Mlk7hTIXQDeH_CISipZiYtdvjSbc3Q3GiS2XgdLaHZMDCL6oV9gf6QPorVu-tOcxROGfSeJrj-6UeK5jN8QaPVwqxyBwTa4OWh3-m5lfNSs-qE/s320/7.JPG" width="320" /></a></div><br />
<br />
<br />
<br />
• Now click the Next button<br />
<br />
• On the next page add a comment “This workflow runs automatically whenever a new e-mail arrives”<br />
<br />
• Then click OK to exit this configuration area<br />
<br />
10. At this point we have our content type configured, but we still have not put it into us in our site, that is our next step. Since we created a custom Document Content Type, we will need to create a document library to house it. Let’s start by creating a document library in the usual way – we will call the library “Contact Us Inbox”. Once our library is created we are ready to associate our content type with it, to accomplish this follow the steps below:<br />
<br />
• From the Document Library click on Settings -> Document Library Settings<br />
<br />
• From the Document Library settings page, Under the General Settings header choose Advanced Settings<br />
<br />
• From the Advance Settings page, in the Content Types section, for the Allow management of content types configuration choose – Yes, and then click OK<br />
<br />
• From the Document Library settings page, under the Content Types Header, choose Add from existing content types<br />
<br />
• From the Add Content Types page, in the Select Content Types section, from Available Site Content Types, choose “Custom Inbox”, and then click the Add button<br />
<br />
• Click the OK button to return to the From the Document Library settings page<br />
<br />
11. Now we need to remove the default Document content type, while SharePoint list and libraries can support multiple Content Types, in our scenario we only want this document library to support our custom content type. To remove the default Document content type follow these steps:<br />
<br />
• From the Document Library settings page, under the Content Types Header, click on the Document content type<br />
<br />
• From the List Content Type page, under the settings header, click on Delete this content type<br />
<br />
• When the pop-up message box appears with the warning message “Are you sure you want to delete this content type” choose OK<br />
<br />
• The content type will be deleted (but only from this one Document library) and you will be returned to the Document Library settings page<br />
<br />
• Now the only content type used by this document library will be our Custom Inbox content type<br />
<br />
12. Now go back to the Document library, and from the library menu choose New, and then from the drop down choose “Custom Inbox”. Your custom Inbox document should open and you should see all the associated metadata from your custom content type. Since all our documents will be created automatically when our custom SharePoint library receives an e-mail, we will not need to create a document manually and so we can close the document.<br />
<br />
I hope that helps!<br />
<br />
Tom MolskowTom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0tag:blogger.com,1999:blog-3981477210525148311.post-91384367076368369452010-12-14T15:31:00.024-05:002012-03-21T13:17:20.165-04:00SharePoint Form Dynamic Field Hide or Reveal Using JavaScript<div dir="ltr" style="text-align: left;" trbidi="on">
1. From time to time a customer asks for fields to be dynamically hidden or revealed on the SharePoint EditForm.aspx or NewForm.aspx. One the most versatile and effective ways to accomplish this is by using the Content Editor Web Part and JavaScript. In this article I will guide you through configuring and developing this kind of functionality.<br />
<br />
2. Here is our scenario; we need to add dynamic capability to a custom task form so that when the user edits the task form and chooses to reassign a task the hidden Reassignment Reason Multi-Line Text field is revealed. Our custom task form will have a customized Task Status field and an additional custom field, Reassignment Reason, as shown below:<br />
<br />
a. Task Status (Choice)<br />
<ul>
<li>Assigned</li>
<li>In Progress</li>
<li>Completed</li>
<li>Reassign </li>
</ul>
b. Reassignment Reason (Multiple Lines of Text)<br />
<br />
3. So the first question you may be asking is “How do I add a CEWP to the Edit and New forms?” I’m glad you asked! While the New and Edit forms do not provide an interface to access to the Edit Page function in the Site Actions menu, you can still get access to this capability through the browser by appending the following query to the end of the URL string for the New and Edit forms:<br />
<br />
<span style="color: black;">&pageview=shared&toolpaneview=2 </span><br />
<br />
4. OK, so now that you can see the Edit Page interface of the Task Form lets add a CEWP in the usual way, just click on the “Add a Web Part” control at the top of the Web Part Zone and then from the Webpage Dialogue scroll down to the Miscellaneous section and choose Content Editor Web Part. Now click on the Add button at the bottom of the dialogue page and the CEWP will be added to the page.<br />
<br />
5. Now click on the edit button of the CEWP in the Web Part Zone and choose the menu option “Modify Shared Web Part”. This will bring up the web part configuration interface in the right panel. From this interface click on the Source Editor and the text entry dialogue box will open. This is the area where you will need to write your code. We aren’t going to write any code right now though, so you can close the dialogue box.<br />
<br />
6. Now we have to talk about the special JavaScript function we will need to use in order to “discover” the SharePoint controls in the task edit page – this function is called “getTagFromIdentifierAndTitle” and it is displayed below:<br />
<br />
<span style="color: black;"><span style="color: blue;">function</span> getTagFromIdentifierAndTitle(tagName, identifier, title) { </span><br />
<span style="color: black;"><span style="color: blue;">var</span> len = identifier.length; </span><br />
<span style="color: black;"><span style="color: blue;">var</span> tags = document.getElementsByTagName(tagName); </span><br />
<br />
<span style="color: black;"><span style="color: blue;">for</span> (var i=0; i < tags.length; i++) </span><br />
<span style="color: black;">{ </span><br />
<span style="color: black;"><span style="color: blue;"> var</span> tempString = tags[i].id; </span><br />
<span style="color: black;"><span style="color: blue;"> if</span> (tags[i].title == title && (identifier == "" ||</span><br />
<span style="color: black;">tempString.indexOf(identifier) == tempString.length - len)) </span><br />
<span style="color: black;"> { </span><br />
<span style="color: black;"><span style="color: blue;"> return</span> tags[i];</span><br />
<span style="color: black;"> }</span><br />
<span style="color: black;"> } </span><br />
<span style="color: black;"><span style="color: blue;">return</span> null; </span><br />
<span style="color: black;">} </span><br />
<br />
7. According to Microsoft this JavaScript function “parses the page’s query string, locates the HTML objects that are rendered by the relevant SharePoint fields, and sets their value.” The function can identify the fields by matching three parameters:<br />
<br />
a. tagName – The name of the tag rendered in the form’s HTML<br />
b. identifier – The string associated with the SharePoint type of the relevant field<br />
c. title – The value of the relevant HTML tag’s “title” attribute, which also matches the field’s display name<br />
<br />
8. While the title parameter is easy to obtain, one of the challenges you will often face when using this script is finding the tagName and identifier parameters. Microsoft provides a partial list as a starting point - see this tech net article:<br />
<br />
<a href="http://blogs.msdn.com/b/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx">http://blogs.msdn.com/b/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx</a><br />
<br />
9. However, there is another way to find this information, by using a very handy tool set that comes installed with Internet Explorer 8, and which Microsoft has very cleverly named “Developer Tools”. To activate the Developer Tools in IE, press F12 or use the "Tools" – "Developer Tools" menu. To find out more information about any element, click on the “Select Element” arrow in the tool set, and then select the element on the page. The tool set will take you to that elements markup and code and provide a great deal of information about that element to include the identifier and tag name. (If you don’t have the option of updating IE to 8 or higher, with IE7 you can use Developer Toolbar for Internet Explorer.)<br />
<br />
10. OK, so now we need to create our function to hide the Reassignment Reason field when the user opens the page. Here is our basic function outline:<br />
<br />
<span style="color: black;"><span style="color: blue;">_spBodyOnLoadFunctionNames.push</span>("hideField"); { </span><br />
<span style="color: black;"><span style="color: blue;">var</span> theInputMLTRR = getTagFromIdentifierAndTitle("TextArea","TextField","Reassignment Reason"); </span><br />
<span style="color: black;">//*** Hide the Field *** </span><br />
<span style="color: black;"><span style="color: blue;">function</span> hideField() </span><br />
<span style="color: black;">{ </span><br />
<span style="color: black;"> theInputMLTRR. parentNode.parentNode.parentNode.style.display = "none";</span><br />
<span style="color: black;">} </span><br />
<br />
<span style="color: black;"><span style="color: blue;">function</span> getTagFromIdentifierAndTitle(tagName, identifier, title) { </span><br />
<span style="color: black;"><span style="color: blue;">var</span> len = identifier.length; </span><br />
<span style="color: black;"><span style="color: blue;">var</span> tags = document.getElementsByTagName(tagName); </span><br />
<br />
<span style="color: black;"><span style="color: blue;">for</span> (var i=0; i < tags.length; i++) </span><br />
<span style="color: black;">{ </span><br />
<span style="color: black;"><span style="color: blue;"> var</span> tempString = tags[i].id; </span><br />
<span style="color: black;"><span style="color: blue;"> if</span> (tags[i].title == title && (identifier == "" ||</span><br />
<span style="color: black;">tempString.indexOf(identifier) == tempString.length - len)) </span><br />
<span style="color: black;"> { </span><br />
<span style="color: black;"> return tags[i]; </span><br />
<span style="color: black;"> } </span><br />
<span style="color: black;">} </span><br />
<span style="color: black;"><span style="color: blue;"> return</span> null; </span><br />
<span style="color: black;">}</span><br />
<span style="color: black;">} </span><br />
<br />
<div>
a. spBodyOnLoadFunctionNames.push() – This is a built in SharePoint function that will allow you run a function when the page loads. This will be very useful to us because we want to hide the Reassignment Reason field before the form is viewed by the user. </div>
<div>
</div>
b. Script Variables – We need to set one variable, the Multi-Line Text Reassignment Reason. This variable will be set using the getTagFromIdentifierAndTitle function<br />
c. style.display – setting this control property to “none” will hide the control from the user.<br />
<br />
<div>
11. Now we have to find a way to reveal the control if the user selects the custom task status choice “Reassign” (as well as a way to hide it back if she changes her mind and chooses another task status after the field is revealed). Here is our next bit of code, our revealField() function:</div>
<div>
</div>
<br />
<span style="color: black;">//*** Reveal the Field *** </span><br />
<span style="color: black;"><span style="color: blue;">function</span> revealField() </span><br />
<span style="color: black;">{ </span><br />
<span style="color: black;"> theInputMLTRR .parentNode.parentNode.parentNode.style.display = "";</span><br />
<span style="color: black;">}</span><br />
<br />
12. All we need now is a way to capture the onChange() event for the custom Task Status field:<br />
<br />
<span style="color: black;"><span style="color: blue;">var</span> theChoice = getTagFromIdentifierAndTitle("TextArea","TextField","Reassignment Reason"); </span><br />
<span style="color: black;">getTagFromIdentifierAndTitle("TextArea","TextField","Reassignment Reason").onchange = function(){revealHideControl()}; </span><br />
<br />
<span style="color: black;">//*** Reveal the Field *** </span><br />
<span style="color: black;"><span style="color: blue;">function</span> revealHideControl(){ </span><br />
<span style="color: black;"><span style="color: blue;">if</span> (theChoice.value == 'Reassign') { </span><br />
<span style="color: black;">revealField(); </span><br />
<span style="color: black;">}<span style="color: blue;">else</span> </span><br />
<span style="color: black;">{ </span><br />
<span style="color: black;">hideField(); </span><br />
<span style="color: black;">} </span><br />
<span style="color: black;">} </span><br />
<br />
13. All we have to do now is copy our script into the CEWP, so let’s go back to the web part configuration interface in the right panel. From this interface click on the Source Editor and the text entry dialogue box will open. Now just copy and paste the code below into the text box and click “Save” which will close the dialogue box. From the right panel interface click “OK” and then from the EditForm.aspx click OK again, and your form is ready to test.<br />
<br />
<div>
</div>
<span style="color: black;"><span style="color: blue;">_spBodyOnLoadFunctionNames.push</span>("hideField"); { </span><br />
<span style="color: black;"><span style="color: blue;">var</span> theInputMLTRR = getTagFromIdentifierAndTitle("TextArea","TextField","Reassignment Reason"); </span><br />
<br />
<span style="color: black;">//*** Hide the Field *** </span><br />
<span style="color: black;"><span style="color: blue;">function</span> hideField() </span><br />
<span style="color: black;">{ </span><br />
<span style="color: black;">theInputMLTRR. parentNode.parentNode.parentNode.style.display = "none"; </span><br />
<span style="color: black;">} </span><br />
<br />
<span style="color: black;">//*** Reveal the Field *** </span><br />
<span style="color: black;"><span style="color: blue;">function</span> revealField() </span><br />
<span style="color: black;">{ </span><br />
<span style="color: black;">theInputMLTRR .parentNode.parentNode.parentNode.style.display = ""; </span><br />
<span style="color: black;">} </span><br />
<br />
<span style="color: black;">//*** Capture the Change Event *** </span><br />
<span style="color: black;"><span style="color: blue;">var</span> theChoice = getTagFromIdentifierAndTitle("select","DropDownChoice","Task Status"); </span><br />
<span style="color: black;">getTagFromIdentifierAndTitle("select","DropDownChoice","Task Status")onchange = function(){revealHideControl()}; </span><br />
<br />
<span style="color: black;">//*** Reveal or Hide the Field *** </span><br />
<span style="color: black;"><span style="color: blue;">function</span> revealHideControl()</span><br />
<span style="color: black;">{ </span><br />
<span style="color: black;"><span style="color: blue;"> if</span> (theChoice.value == 'Reassign') </span><br />
<span style="color: black;"> { </span><br />
<span style="color: black;"> revealField(); </span><br />
<span style="color: black;"> } </span><br />
<span style="color: black;"><span style="color: blue;"> else</span> </span><br />
<span style="color: black;"> { </span><br />
<span style="color: black;"> hideField(); </span><br />
<span style="color: black;"> } </span><br />
<span style="color: black;">} </span><br />
<br />
<span style="color: black;">//*** getTagFromIdentifierAndTitle *** </span><br />
<span style="color: black;"><span style="color: blue;">function</span> getTagFromIdentifierAndTitle(tagName, identifier, title) { </span><br />
<span style="color: black;"><span style="color: blue;">var</span> len = identifier.length; </span><br />
<span style="color: black;"><span style="color: blue;">var</span> tags = document.getElementsByTagName(tagName); </span><br />
<br />
<span style="color: black;"><span style="color: blue;">for</span> (var i=0; i < tags.length; i++) </span><br />
<span style="color: black;">{ </span><br />
<span style="color: black;"><span style="color: blue;"> var</span> tempString = tags[i].id; </span><br />
<span style="color: black;"><span style="color: blue;"> if</span> (tags[i].title == title && (identifier == "" ||</span><br />
<span style="color: black;">tempString.indexOf(identifier) == tempString.length - len)) </span><br />
<span style="color: black;"> { </span><br />
<span style="color: black;"><span style="color: blue;"> return</span> tags[i]; </span><br />
<span style="color: black;"> } </span><br />
<span style="color: black;">} </span><br />
<span style="color: black;"><span style="color: blue;"> return</span> null; </span><br />
<span style="color: black;">} </span><br />
<span style="color: black;">}</span><br />
<br />
14. There are other ways to find controls, such as using the returnObjById(id) function, but for whatever reason, Microsoft doesn’t recommend using this approach. On the other hand, in the SharePoint Community the getTagFromIdentifierAndTitle function is well known, well documented, and heavily used, so I recommend starting with this method whenever possible.<br />
<br />
<span style="color: black;">I hope that helps!</span><br />
<br />
<span style="color: black;">Tom Molskow</span><br />
<br />
<div>
</div>
<br />
<div>
</div>
<br />
<div>
</div>
<br />
<div>
</div>
<br />
<div>
</div>
<br />
<div>
</div>
<br />
<div>
</div>
<br />
<div>
</div>
</div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com20tag:blogger.com,1999:blog-3981477210525148311.post-70971085132733594632010-12-09T12:14:00.001-05:002012-04-17T08:53:28.495-04:00SharePoint 2007 Form Validation Using JavaScript<div dir="ltr" style="text-align: left;" trbidi="on">
1. From time to time a customer asks for validation on the SharePoint EditForm.aspx or NewForm.aspx. While there are many types of form validation that can be done, one of the most versatile and effective is validation using the Content Editor Web Part and JavaScript. In this article I will guide you through configuring and developing this kind of validation.<br />
<br />
2. Here is our scenario; we need to add validation to a custom task form so that when the user edits the task form and reassigns the task he is prompted to provide a reason for the reassignment. Our custom task form will have a customized Task Status field and an additional custom field, Reassignment Reason, as shown below:<br />
<br />
a. Task Status (Choice)<br />
<br />
i. Assigned<br />
ii. In Progress<br />
iii. Completed<br />
iv. Reassign<br />
<br />
b. Reassignment Reason (Multiple Lines of Text)<br />
<br />
3. So the first question you may be asking is “How do I add a CEWP to the Edit and New forms?” I’m glad you asked! While the New and Edit forms do not provide an interface to access to the Edit Page function in the Site Actions menu, you can still get access to this capability through the browser by appending the following query to the end of the URL string for the New and Edit forms: <br />
<br />
&pageview=shared&toolpaneview=2<br />
<br />
4. OK, so now that you can see the Edit Page interface of the Task Form lets add a CEWP in the usual way, just click on the “Add a Web Part” control at the top of the Web Part Zone and then from the Webpage Dialogue scroll down to the Miscellaneous section and choose Content Editor Web Part. Now click on the Add button at the bottom of the dialogue page and the CEWP will be added to the page.<br />
<br />
5. Now click on the edit button of the CEWP in the Web Part Zone and choose the menu option “Modify Shared Web Part”. This will bring up the web part configuration interface in the right panel. From this interface click on the Source Editor and the text entry dialogue box will open. This is the area where you will need to write your code. We aren’t going to write any code right now though, so you can close the dialogue box.<br />
<br />
6. Now we have to talk about the special JavaScript function we will need to use in order to “discover” the SharePoint controls in the task edit page – this function is called “getTagFromIdentifierAndTitle” and it is displayed below:<br />
<br />
<span style="color: black;"><span style="color: blue;">function</span> getTagFromIdentifierAndTitle(tagName, identifier, title) {</span><br />
<span style="color: black;"><span style="color: blue;">var</span> len = identifier.length;</span><br />
<span style="color: black;"><span style="color: blue;">var</span> tags = document.getElementsByTagName(tagName);</span><br />
<span style="color: black;"><span style="color: blue;">for</span> (var i=0; i < tags.length; i++) {</span><br />
<span style="color: black;"><span style="color: blue;">var</span> tempString = tags[i].id;</span><br />
<span style="color: black;"><span style="color: blue;">if</span> (tags[i].title == title && (identifier == "" ||</span><br />
<span style="color: black;">tempString.indexOf(identifier) == tempString.length - len)) {</span><br />
<span style="color: black;"><span style="color: blue;">return</span> tags[i];</span><br />
<span style="color: black;">}}</span><br />
<span style="color: black;"><span style="color: blue;">return</span> null;</span><br />
<span style="color: black;">}</span><br />
<br />
7. According to Microsoft this JavaScript function “parses the page’s query string, locates the HTML objects that are rendered by the relevant SharePoint fields, and sets their value.” The function can identify the fields by matching three parameters:<br />
<br />
a. tagName – The name of the tag rendered in the form’s HTML <br />
<br />
b. identifier – The string associated with the SharePoint type of the relevant field <br />
<br />
c. title – The value of the relevant HTML tag’s “title” attribute, which also matches the field’s display name<br />
<br />
8. While the title parameter is easy to obtain, one of the challenges you will often face when using this script is finding the tagName and identifier parameters. Microsoft provides a partial list as a starting point - see this tech net article: <a href="http://blogs.msdn.com/b/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx">http://blogs.msdn.com/b/sharepointdesigner/archive/2007/06/13/using-javascript-to-manipulate-a-list-form-field.aspx</a><br />
<br />
9. However, there is another way to find this information, by using a very handy tool set that comes installed with Internet Explorer 8, and which Microsoft has very cleverly named “Developer Tools”. To activate the Developer Tools in IE, press F12 or use the "Tools" – "Developer Tools" menu. To find out more information about any element, click on the “Select Element” arrow in the tool set, and then select the element on the page. The tool set will take you to that elements markup and code and provide a great deal of information about that element to include the identifier and tag name. (If you don’t have the option of updating IE to 8 or higher, with IE7 you can use Developer Toolbar for Internet Explorer.) <br />
<br />
10. OK, so now we need to create our function to validate the form when the user commits the change. Here is our basic function outline:<br />
<br />
<span style="color: black;"><span style="color: blue;">function</span> PreSaveAction() { </span><br />
<span style="color: #38761d;">//*** Script Variables ***</span><br />
<span style="color: #38761d;">//Drop Down List Task Status</span><br />
<span style="color: black;"><span style="color: blue;">var</span> theInputDDLTS = getTagFromIdentifierAndTitle("select","DropDownChoice","Task Status");</span><br />
<span style="color: #38761d;">//Multi-Line Text Reassignment Reason</span><br />
<span style="color: black;"><span style="color: blue;">var</span> theInputMLTRR = getTagFromIdentifierAndTitle("TextArea","TextField","Reassignment Reason");</span><br />
<span style="color: black;"><span style="color: blue;">if</span>(theInputDDLTS.value == "Reassign")</span><br />
<span style="color: black;">{</span><br />
<span style="color: black;"><span style="color: blue;">if</span>(theInputMLTRR.value == "" </span><br />
<span style="color: black;">theInputMLTRR.value == "" </span><br />
<span style="color: black;">theInputMLTRR.value == "" </span><br />
<span style="color: black;">theInputMLTRR.value == "" </span><br />
<span style="color: black;">theInputMLTRR.value == "")</span><br />
<span style="color: black;">{</span><br />
<span style="color: black;"><span style="color: blue;">alert</span>("When the Task Status field's value is set to Reassign you must fill in the Reassignment Reason text box. Please either fill in the Reassignment Reason text box or change the value of the Task Status field.");</span><br />
<span style="color: black;"><span style="color: blue;">return</span> false;</span><br />
<span style="color: black;">}</span><br />
<span style="color: blue;">else</span><br />
<span style="color: black;">{</span><br />
<span style="color: black;"><span style="color: blue;">return</span> true;</span><br />
<span style="color: black;">}} }</span><br />
<br />
a. The PreSaveAction() – This is a built in SharePoint function that will allow you to perform validation without PostBack. This will be very useful to us because we want to catch the user’s errors before the form is saved.<br />
<br />
b. Script Variables – We need to set two variables, one for the Drop Down List Task Status, and the other for the Multi-Line Text Reassignment Reason. Both of these variables will be set using the getTagFromIdentifierAndTitle function.<br />
<br />
c. Nested If Statements – The first “if” statement checks to see if the user selected the task status “reassign”, the second “if” statement checks to see if the Reassignment Reason field is empty (which can represent several different HTML configurations).<br />
<br />
d. Both Conditions True - If both conditions are true then the script will execute an alert message informing the using that he must provide a reassignment reason, it then returns false which prevents the form from saving.<br />
<br />
e. Only the first Condition is True – If only the first condition is true then that means the user selected the status “reassign” and also provided a reassignment reason, and so the function returns “true” allowing the form to save.<br />
<br />
11. OK, all we have to do now is copy our script into the CEWP, so let’s go back to the web part configuration interface in the right panel. From this interface click on the Source Editor and the text entry dialogue box will open. Now just copy and paste the code below into the text box and click “Save” which will close the dialogue box. From the right panel interface click “OK” and then from the EditForm.aspx click OK again, and your form is ready to test.<br />
<br />
<span style="color: black;"><span style="color: blue;">function</span> PreSaveAction() { </span><br />
<span style="color: #38761d;">//*** Script Variables ***</span><br />
<span style="color: #38761d;">//Drop Down List Task Status</span><br />
<span style="color: black;"><span style="color: blue;">var</span> theInputDDLTS = getTagFromIdentifierAndTitle("select","DropDownChoice","Task Status");</span><br />
<span style="color: #38761d;">//Multi-Line Text Reassignment Reason</span><br />
<span style="color: black;"><span style="color: blue;">var</span> theInputMLTRR = getTagFromIdentifierAndTitle("TextArea","TextField","Reassignment Reason");</span><br />
<span style="color: black;"><span style="color: blue;">if</span>(theInputDDLTS.value == "Reassign")</span><br />
<span style="color: black;">{</span><br />
<span style="color: black;"><span style="color: blue;">if</span>(theInputMLTRR.value == "" </span><br />
<span style="color: black;">theInputMLTRR.value == "" </span><br />
<span style="color: black;">theInputMLTRR.value == "" </span><br />
<span style="color: black;">theInputMLTRR.value == "" </span><br />
<span style="color: black;">theInputMLTRR.value == "")</span><br />
<span style="color: black;">{</span><br />
<span style="color: black;"><span style="color: blue;">alert</span>("When the Task Status field's value is set to Reassign you must fill in the Reassignment Reason text box. Please either fill in the Reassignment Reason text box or change the value of the Task Status field.");</span><br />
<span style="color: black;"><span style="color: blue;">return</span> false;</span><br />
<span style="color: black;">}</span><br />
<span style="color: blue;">else</span><br />
<span style="color: black;">{</span><br />
<span style="color: black;"><span style="color: blue;">return</span> true;</span><br />
<span style="color: black;">}</span><span style="color: black;">} </span><span style="color: black;"><br />
</span><br />
<span style="color: black;"><span style="color: blue;">function</span> getTagFromIdentifierAndTitle(tagName, identifier, title) {</span><br />
<span style="color: black;"><span style="color: blue;">var</span> len = identifier.length;</span><br />
<span style="color: black;"><span style="color: blue;">var</span> tags = document.getElementsByTagName(tagName);</span><br />
<span style="color: black;"><span style="color: blue;">for</span> (var i=0; i < tags.length; i++) {</span><br />
<span style="color: black;"><span style="color: blue;">var</span> tempString = tags[i].id;</span><br />
<span style="color: black;"><span style="color: blue;">if</span> (tags[i].title == title && (identifier == "" ||</span><br />
<span style="color: black;">tempString.indexOf(identifier) == tempString.length - len)) {</span><br />
<span style="color: black;"><span style="color: blue;">return</span> tags[i];</span><br />
<span style="color: black;">}</span><span style="color: black;">}</span><br />
<span style="color: black;"><span style="color: blue;">return</span> null;</span><br />
<span style="color: black;">}</span><span style="color: black;">}</span><br />
<br />
12. There are other ways to do this type of validation, such as using the returnObjById(id) function, but for whatever reason, Microsoft doesn’t recommend using this approach. On the other hand, in the SharePoint Community the getTagFromIdentifierAndTitle function is well known, well documented, and heavily used, so I recommend starting with this method whenever possible.<br />
<br />
I hope that helps!<br />
<br /></div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com8tag:blogger.com,1999:blog-3981477210525148311.post-4352042807057340482010-11-16T16:39:00.000-05:002012-03-26T16:22:44.461-04:00K2 BlackPoint Work Around – Update Every Item in a List<div dir="ltr" style="text-align: left;" trbidi="on">
This Blogs will discuss the third party workflow tool - K2 BlackPoint. As you may know, K2 BlackPoint is the GUI only version of K2 BlackPearl in the same way SharePoint Designer (SPD) workflows are the GUI only version of Visual Studio workflows. In many ways K2 BlackPoint workflows are more powerful then SPD workflows but on the flip side, in many other ways they are more obscure and difficult. This is designed to get you through the more obscure and difficult design tasks so you can get your project developed and deployed! So let's get started...<br />
<br />
1. While many difficult development tasks are often much easier to perform with a GUI design tool such as K2 BlackPoint, often times, the reverse is also true, i.e. many simple development tasks are often much more difficult to perform with a design tool. For example, the For Each Loop is a construct that is common to all development languages and scripts and yet this capability is totally absent from the K-2 BlackPoint GUI tool set (and to be fair it is also absent from the SharePoint Designer tool set). The For Each Loop is obviously a very useful construct, we could use it to archive all the content in a list that is past a certain date, parse through all the items in a list and update metadata values, or even loop through all the lists on a site and change their security settings. Without this construct in our tool kit we are definitely missing some very useful capabilities. But there is good news! Even though there isn’t an Out of the Box way to create a For Each Loop in K2 BlackPoint, there is still a way to create this functionality through configuration and that’s what the following discussion will demonstrate.<br />
<br />
2. To begin with we will create our SharePoint lists. We will need to create a list with a metadata value that can be changed by our K2 BlackPoint For Each Loop, so we will add a Boolean value that can be flipped from No to Yes. Create a list called SPLoopList and give it the following metadata names and types:<br />
<br />
a. Single Line of Text – Title<br />
<br />
b. Yes/No – Processed<br />
<br />
Now add five records to the list, giving each one the title Processed n, and setting each Boolean filed to No.<br />
<br />
3. Next, we need to create a list for logging our workflow actions. In development it’s always good to create your own verbose log for error catching and analysis, and since we are using a SharePoint site already, it’s quick and easy to create a log as a custom list. Create a list called SPLog and give it the following metadata names and types:<br />
<br />
a. Single Line of Text – Title<br />
<br />
b. Multiple Lines of Text – Log<br />
<br />
You don’t need to create any items in this list; our K2 workflow will do that for us.<br />
<br />
4. Now for the workflow! Let’s create a new K2 Project, we will call it K2Utilities. Next create a SharePoint Process for your new project, let’s call that ForEachLoop. Now in K2 Studio create the basic process structure as follows:<br />
<br />
a. Create a Process called “Search”<br />
<br />
b. Create a Process called “Update”<br />
<br />
c. Create a Process called “End”<br />
<br />
d. Draw a line between Start and Search, label it “Search”<br />
<br />
e. Draw a line Between Search and Update, label it “Update”<br />
<br />
f. Draw a line loop back from Update to Search, label it “Loop”<br />
<br />
g. Draw a line from Search to End, label it “End”<br />
<br />
The process you have designed so far should look like this:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpC7fdzba9FlRRx5kBWbLM6wllTM09cjNlRN9OeKRtLXBYqsc8Bc6NejIr0WzE62XsRCR75QzxiqHHCzsOizOnwV6l0MYm-HJM2myLoQ-P9krAo2STvzNG-7ietkT9vhQkQy4jJBpunjQ/s1600/k2wa1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" px="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpC7fdzba9FlRRx5kBWbLM6wllTM09cjNlRN9OeKRtLXBYqsc8Bc6NejIr0WzE62XsRCR75QzxiqHHCzsOizOnwV6l0MYm-HJM2myLoQ-P9krAo2STvzNG-7ietkT9vhQkQy4jJBpunjQ/s320/k2wa1.JPG" width="272" /></a></div>
<br />
5. Next we have to associate this workflow with our SharePoint list – SPLoopList. To do this, follow this steps in K2 Studio:<br />
<br />
a. Under the Process Tab click on the SharePoint Workflow button<br />
<br />
b. From the SharePoint Workflow Integration dialogue box choose to Associate this Workflow with: A SharePoint List or Document Library and then click the Next button<br />
<br />
c. From the Connection Settings dialogue box click on the ellipsis box to choose the SharePoint Site URL you will use <br />
<br />
d. On the pop-up Context Browser choose SharePoint Servers, and then the name of the SharePoint Site you will use (this would be the site that contains the SPLog and SPLoopList)<br />
<br />
e. Back in the Connection Settings for the List or Library setting panel click on the browse button and choose the SPLoopList<br />
<br />
f. Now click Finish<br />
<br />
Our Workflow is now associated with our list!<br />
<br />
6. Now let’s configure our Start Process to run the workflow Manually, follow the steps below:<br />
<br />
a. Right click on the Start Activity and from the pop-up context menu choose Properties<br />
<br />
b. From the Process General Properties Menu choose the Actions Icon which would be all the way at the bottom left of the dialogue box<br />
<br />
c. At the Actions menu click back, this will take you to the K2 Welcome screen<br />
<br />
d. At the K2 Welcome screen click in the box labeled Run this wizard in Advanced Mode and click Next<br />
<br />
e. Keep clicking Next until you get to the Start Options screen, at this screen choose the Start Option – Allows this workflow to be started by an authenticated user with Edit Items Permissions, then click Finish <br />
<br />
7. So let’s create the logic for our Search Activity, first we will need to create a SharePoint Search Event:<br />
<br />
a. From the Event Wizard Explorer Drag a SharePoint Search Event unto the Search activity surface<br />
<br />
b. From the SharePoint Search Results configuration wizard splash screen click Next<br />
<br />
c. From the Event Name and Action panel name the event Find Processed No and then choose Search in a SharePoint List or Library and click Next<br />
<br />
d. From the Search List or Library panel choose the same site and list that you choose in step 5, then click Next<br />
<br />
e. From the Search Filters panel click on the Add button and then configure the Add Filter dialogue as you see below and then click OK and Next<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBC6orRp1VdCYp-6OCNqPHPYB9ksbXZIZBAUXkclXvsZd8cJ-0LT8ZG_l61RPlBh5AZoJfzImZYr4AnDtbUtJENtufm7OZe_y6eubKZrzLWomkBOJiI6N2Lc8ssIut6K6weOPLZEhMAZE/s1600/k2wa2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" px="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBC6orRp1VdCYp-6OCNqPHPYB9ksbXZIZBAUXkclXvsZd8cJ-0LT8ZG_l61RPlBh5AZoJfzImZYr4AnDtbUtJENtufm7OZe_y6eubKZrzLWomkBOJiI6N2Lc8ssIut6K6weOPLZEhMAZE/s320/k2wa2.JPG" width="320" /></a></div>
<br />
f. In the Store and Limit Results panel next to the Content Field text box click on the Create button and Name the Content Field “SearchResults”, and click OK<br />
<br />
g. Back at the Store and Limit Results panel in the Maximum Results text box put the number 1 and make sure the No Limit box is unchecked, if your configurations appear as below then click Next<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0m7lJUrdZMEGpsUTgEZcb8GfRhTR-zNpRgkViCMouQpa9v4daB5O2NVuwWK4UYMglVsbeHoEOedrFTjdqLC4I_GnO37Jx0XnksB6ZzZeKY8BAkUpE6hBKuqXb90q3_p17Mk9lVnp2Gus/s1600/k2wa3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="146" px="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0m7lJUrdZMEGpsUTgEZcb8GfRhTR-zNpRgkViCMouQpa9v4daB5O2NVuwWK4UYMglVsbeHoEOedrFTjdqLC4I_GnO37Jx0XnksB6ZzZeKY8BAkUpE6hBKuqXb90q3_p17Mk9lVnp2Gus/s320/k2wa3.JPG" width="320" /></a></div>
<br />
h. Now click Finish<br />
<br />
8. Now that we have created a SharePoint Search Event, we need to create a SharePoint List Items event for our SPLog:<br />
<br />
a. From the Event Wizard Explorer Drag a SharePoint List Items event unto the Search activity surface<br />
<br />
b. From the SharePoint List Items configuration wizard splash screen click Next<br />
<br />
c. From the Event Name and Action panel name the event Create Log Search and then choose Create List Items and click Next<br />
<br />
d. From the Create List Item panel choose the same Site that you chose in step 5, but for your list choose the SPLog list, then click Next<br />
<br />
e. From the List Item metadata panel click on Title and then click on Assign and Type “Search”<br />
<br />
f. From the List Item metadata panel click on Log, click on Assign and then in the Log multiline text box type “Search Results: “, now click on the Ellipsis box and from the Context Browser choose the SearchResults content type and Item metadata and click Add<br />
<br />
g. Back in the Log multiline text box type add a return and then type “Item ID: “, now click on the Ellipsis box and from the Context Browser choose the SharePoint_Item content type and then the Items – Item – ID metadata and click Add, if your Log multi-line text box appears as below then click OK, Next and Finish<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeF8GHYSVNnhnnRsX7Ibpax_God9T2AOOdg4Q7k7fls1Oo1EN04uc3ehUmnvTf3CUQ12z8jUNsDB0PY1lCFZt28Fk-yzGqx2ugU21xQsNOuy946K2X82A3wgBiLTopt5Y4hZr6Ka-jOTw/s1600/k2wa4.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="146" px="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgeF8GHYSVNnhnnRsX7Ibpax_God9T2AOOdg4Q7k7fls1Oo1EN04uc3ehUmnvTf3CUQ12z8jUNsDB0PY1lCFZt28Fk-yzGqx2ugU21xQsNOuy946K2X82A3wgBiLTopt5Y4hZr6Ka-jOTw/s320/k2wa4.JPG" width="320" /></a></div>
<br />
9. The Next step is to add a Null content type which we will need for our line rule. To create a Null content type follow these steps:<br />
<br />
a. From the Object Browser Environment Tab click on XML Fields group to open it and then right click on the ForEachLoop and Choose Add<br />
<br />
b. In the Add XML Field dialogue box, under the General Tab, in the Name field enter “Null”<br />
<br />
c. In the Initial Value field enter the following - <items type="Documents"></items><br />
<br />
d. In the Metadata field enter the following - <items type="Documents"></items><br />
<br />
e. Click OK to close the Add XML Field dialogue box<br />
<br />
10. Now we can create a Liner rule for our Update Line. We want this rule to check the search results, and only process the next activity if the search results are not null. To create this line rule follow these steps:<br />
<br />
a. Right click on the Update line and choose properties from the context menu list<br />
<br />
b. From the Line General Properties panel click on the Line icon on the left<br />
<br />
c. From the Line Rule panel click on the Add button<br />
<br />
d. In the Add/Edit dialogue box add these values<br />
<br />
i. First Variable: SearchResults<br />
<br />
ii. Comparison Operator: <> (Does Not Equal)<br />
<br />
iii. Second Variable: Null<br />
<br />
e. Your Add/Edit Rule Panel should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIC6iWjZ3gAxLbR2Dw29X8600vEoos6ZU79XvXBDPoUWt47zWSDKS4zsTPcSm_l3VwvtlsLHbKR9IUY0Cbn29A4K_QM456S2POHr53qPnooG8B6NgN3Rub68BL59FGao_0LpFvKAhIwT4/s1600/k2wa5.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" px="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIC6iWjZ3gAxLbR2Dw29X8600vEoos6ZU79XvXBDPoUWt47zWSDKS4zsTPcSm_l3VwvtlsLHbKR9IUY0Cbn29A4K_QM456S2POHr53qPnooG8B6NgN3Rub68BL59FGao_0LpFvKAhIwT4/s320/k2wa5.JPG" width="267" /></a></div>
<br />
f. Now click OK and Finish<br />
<br />
11. Next we need to create a SharePoint List Items event for the Update activity. Follow these steps to create the event:<br />
<br />
a. From the Event Wizard Explorer Drag a SharePoint List Items event unto the Update activity surface<br />
<br />
b. From the SharePoint List Items configuration wizard splash screen click Next<br />
<br />
c. From the Event Name and Action panel name the event Update List and then choose Update List Items: SharePoint List Items and click Next<br />
<br />
d. From the Update List Item panel choose the same Site that you chose in step 5, but for your list choose the SPLoopList, then for the List Item ID choose the SearchResults_Items_Item XML field from the Context Browser Process/Activity Data, the dialogue box should appear as below:<br />
<br />
<div align="left" class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy7lom61Vlqk5iSkwOpV8aBDYyJ8jIGdEb_jUn-aWT6pHIPvIQgiw9oJhRJC027J5nI1ikulLGI3N-J343-SF7BOJppbpryHKGG2cWGRRTKXfKJ-m6ojNVB1b92Wsli99TXZsm2UQhNas/s1600/k2wa6.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="145" px="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjy7lom61Vlqk5iSkwOpV8aBDYyJ8jIGdEb_jUn-aWT6pHIPvIQgiw9oJhRJC027J5nI1ikulLGI3N-J343-SF7BOJppbpryHKGG2cWGRRTKXfKJ-m6ojNVB1b92Wsli99TXZsm2UQhNas/s320/k2wa6.JPG" width="320" /></a></div>
e. Now click Next<br />
<br />
f. From the List Item metadata panel click on Processed and then click on Assign and choose “Yes”, then click OK, Next and Finish<br />
<br />
12. OK, now our Update Activity needs to overwrite the SearchResults content type and set all values to Null. If we don’t do this when the Find Processed No Search Event runs again it will simply append the new item ID number to the existing one giving us results like 12, 123, 124, etc. To work around this problem we will create a K2 Data Event – follow the steps below:<br />
<br />
a. Drag and Drop a K2 Data Event unto the Update activity<br />
<br />
b. From the initial wizard panel click Next<br />
<br />
c. At the Data Event Panel name the event “UpdateSearchResults” and under Data Replication choose Transfer Data and click Next<br />
<br />
d. In the Data Locations panel click on the Assign button which will open a new Assign dialogue box<br />
<br />
e. From the Assign panel choose the Source as the Process Activity Data – For Each Loop – Null value<br />
<br />
f. Still from the Assign panel choose the Destination as the Process Activity Data – For Each Loop – Search Results value, then click Finish<br />
<br />
g. Click Finish again<br />
<br />
13. To finish off this activity we need to create another log event, we can easily do this by simply copying the log event from our Search activity, follow these steps:<br />
<br />
a. In the Search activity right click on the Create Log Search event and from the pop-up context menu choose copy<br />
<br />
b. Now hover your mouse over the Update activity, right click, from the pop-up context menu choose paste<br />
<br />
c. Now double click on the Create Search Log event in the Update activity to open the event wizard, click Next<br />
<br />
d. In the Event Name and Action panel change the event name to Create Log Update, click Next and then Next again<br />
<br />
e. In the List Item Metadata panel change the Title to Update, change the Note field to change the Search results Text to Update, leave the rest as it is and then click next and Finish<br />
<br />
14. Now we can create the conditional logic for our Exit Loop line. Follow the steps below:<br />
<br />
a. Right click on the Exit Loop line and choose properties from the context menu list<br />
<br />
b. From the Line General Properties panel click on the Line icon on the left<br />
<br />
c. From the Line Rule panel click on the Add button<br />
<br />
d. In the Add/Edit dialogue box add these values<br />
<br />
i. First Variable: SearchResults<br />
<br />
ii. Comparison Operator: = (Equals)<br />
<br />
iii. Second Variable: Null<br />
<br />
e. Your Add/Edit Rule Panel should appear as below:<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_1iV9fuKHpHHs6S6fl5juXVUPp5iDmwL5BGT8YxM5Tx2Mkh__1AqeU-dH1slWxpNEWkCyvW5cNNeTORrFjMUetgKYtcH2kEGk9c-b2XHZ144gYLmFPy1rd_tQDZRTwhq28u055sglvgg/s1600/k2wa7.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" px="true" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_1iV9fuKHpHHs6S6fl5juXVUPp5iDmwL5BGT8YxM5Tx2Mkh__1AqeU-dH1slWxpNEWkCyvW5cNNeTORrFjMUetgKYtcH2kEGk9c-b2XHZ144gYLmFPy1rd_tQDZRTwhq28u055sglvgg/s320/k2wa7.JPG" width="267" /></a></div>
<br />
f. Now click OK and Finish<br />
<br />
15. OK, we’re getting close, four our next step we are going to create another log event, we can easily do this by simply copying the log event from our Search activity again, follow these steps:<br />
<br />
a. In the Search activity right click on the Create Log Search event and from the pop-up context menu choose copy<br />
<br />
b. Now hover your mouse over the End activity, right click, from the pop-up context menu choose paste<br />
<br />
c. Now double click on the Create Search Log event in the Update activity to open the event wizard, click Next<br />
<br />
d. In the Event Name and Action panel change the event name to Create Log End, click Next and then Next again<br />
<br />
e. In the List Item Metadata panel change the Title to End, change the Note field to change the Search results Text to End, leave the rest as it is and then click next and Finish<br />
<br />
16. Finally, we need to hook up the error catching/logging mechanisms by enabling the Exception Properties on all the Activities and Lines, you will enable these properties:<br />
<br />
a. Enable exception rule<br />
<br />
b. Log exception to the server<br />
<br />
c. Log exception to the error log<br />
<br />
17. Save the Project and then click on the Orange Deployment arrow.<br />
<br />
18. Now go to your list and run the workflow. In a few seconds you should see every item in the list updated by the workflow – a For Each Loop in a GUI driven workflow design tool – whurah!<br />
<br />
<br />
I hope that helps!<br />
<br />
Tom Molskow<br />
Senior SharePoint Architect</div>Tom Molskowhttp://www.blogger.com/profile/01224161982994081203noreply@blogger.com0