<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.simple-talk.com/community/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Charles Lee</title><link>http://www.simple-talk.com/community/blogs/charleslee/default.aspx</link><description /><dc:language>en-US</dc:language><generator>CommunityServer 2.0 (Build: 60217.2664)</generator><item><title>SharePoint 2010 release date - is it that important?</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2010/03/10/90216.aspx</link><pubDate>Wed, 10 Mar 2010 10:00:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:90216</guid><dc:creator>CharlesLee</dc:creator><slash:comments>5</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/90216.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=90216</wfw:commentRss><description>&lt;p&gt;There has been lots of excitement in the SharePoint community over the last few days as Microsoft have announced the &lt;a href="http://sharepoint.microsoft.com/businessproductivity/proof/pages/2010-launch-events.aspx#fbid=-Se8naersfE" target="_blank"&gt;official release date of SharePoint 2010&lt;/a&gt;. &lt;strong&gt; May 12th is the date for your diaries&lt;/strong&gt; (RTM in April.)&lt;/p&gt;  &lt;p&gt;The &lt;a href="http://twitter.com/search#search?q=sharepoint%202010%20release" target="_blank"&gt;twittersphere&lt;/a&gt; has been telling everyone for the last few days about this news and there is much excitement.&lt;/p&gt;  &lt;p&gt;The major conferences this year all seem to have a SharePoint 2010 focus and some are entirely focussed on the new product (e.g. &lt;a href="http://www.sharepointevolutionconference.com/" target="_blank"&gt;SharePoint Evolution Conference&lt;/a&gt;.)&amp;#160; &lt;/p&gt;  &lt;p&gt;Now by all accounts Microsoft have plugged some significant functionality gaps that exist in WSS 3.0 and MOSS 2007 and provided some exciting new functionality.&amp;#160; You don't need me to tell you about these as the MVPs (and other community members) are doing a sterling job, after all that is why Microsoft has MVPs in the first place.&lt;/p&gt;  &lt;p&gt;Lets &lt;strong&gt;get real for a second&lt;/strong&gt; though as there is a significant investment involved in moving to SharePoint 2010:&amp;#160; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Firstly you need 64 bit architecture across the board, now for some environments that is no inconsequential hurdle, that's a pretty significant roadblock.&amp;#160;&amp;#160; &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;The development farm, test farm and UAT farm are all going to require the same infrastructure upgrades.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;To take advantage of the tooling for SP2010 you will need to upgrade to Visual Studio 2010 and your development team is going to require 64 bit hardware/OS too.&amp;#160; &lt;br /&gt;&lt;em&gt;&lt;font color="#808080" size="1"&gt;I would not recommend installing SP 2010 in client installation mode (i.e. for Windows 7) on your developer machines, I would use this for demo machines only.          &lt;br /&gt;&lt;/font&gt;&lt;/em&gt;&lt;/li&gt;    &lt;li&gt;Something that lots of people seem to forget in all their whooping and hollering about the new release is that there is a large amount of end user training going to be required as the browser UI has now adopted the omnipotent ribbon interface and there are other new and more complicated features.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;SharePoint Designer has also entirely changed in both look and feel and some significant feature changes have taken place.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Lest we should forget that some companies have not long upgraded to MOSS 2007 and are yet to see a significant ROI for that project. And the reticence that most companies feel about implementing v1 Microsoft products.&amp;#160; &lt;br /&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;This is only the surface of the deeper issues which would be involved in any upgrade process, so I guess I share a small part of the concern voiced by Mark Miller of &lt;a href="http://www.endusersharepoint.com/2010/02/23/is-sharepoint-2010-relevant/" target="_blank"&gt;EndUserSharePoint.com&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;Is SharePoint 2010 relevant?&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I don't share this sentiment in its entirety as I firmly believe that &lt;strong&gt;all companies should be looking at SharePoint 2010 from day one&lt;/strong&gt;, however most large scale existing implementations of MOSS 2007 are going to be several years away from a serious upgrade project.&amp;#160; So should the conference organisers and the SharePoint community as a whole be a little more understanding of the real world issues?&amp;#160; It's easy to get carried away in the excitement of a new product and new tools to play with but there needs to be a focus on the real world issues that most people are facing day to day and at the moment and for the short term future (at the very least the next 12 months) that is fairly and squarely in the WSS 2.0/3.0 and SPS 2003/MOSS 2007 camps.&lt;/p&gt;  &lt;p&gt;Don't get me wrong, I am &lt;strong&gt;very very excited&lt;/strong&gt; about getting to grips with SharePoint 2010 in the real world and I cannot wait for my first real project to come along, but for now I am just being realistic about the reality for most people who work with SharePoint. &lt;/p&gt;  &lt;p&gt;I have been spending a lot of time on &lt;a href="http://www.sharepointoverflow.com"&gt;www.sharepointoverflow.com&lt;/a&gt; recently as there is a community of people building up who are committed to answering the real world questions that folks are dealing with every day.&amp;#160; I urge you to take a look and either ask or answer some questions direct from the front line of the SharePoint world.&lt;/p&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=90216" width="1" height="1"&gt;</description><category domain="http://www.simple-talk.com/community/blogs/charleslee/archive/category/1025.aspx">SharePoint</category><category domain="http://www.simple-talk.com/community/blogs/charleslee/archive/category/1033.aspx">SharePoint 2010</category></item><item><title>SharePoint: Numeric/Integer Site Column (Field) Types</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2010/03/01/90071.aspx</link><pubDate>Mon, 01 Mar 2010 10:00:26 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:90071</guid><dc:creator>CharlesLee</dc:creator><slash:comments>1</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/90071.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=90071</wfw:commentRss><description>&lt;p&gt;What field type should you use when creating number based site columns as part of a SharePoint feature?&lt;/p&gt;  &lt;p&gt;Windows SharePoint Services 3.0 provides you with an extensible and flexible method of developing and deploying Site Columns and Content Types (both of which are required for most SharePoint projects requiring list or library based data storage) via the feature framework (more on this in my next full article.) However there is an interesting behaviour when working with a column or field which is required to hold a number, which I thought I would blog about today. &lt;/p&gt;  &lt;p&gt;When creating Site Columns in the browser you get a nice rich UI in order to choose the properties of this field:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/SharePointIntegerFieldColumn_D0AD/image.png"&gt;&lt;img title="image" border="0" alt="image" src="http://www.simple-talk.com/blogbits/CharlesLee/SharePointIntegerFieldColumn_D0AD/image_thumb.png" width="454" height="180" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/SharePointIntegerFieldColumn_D0AD/image_3.png"&gt;&lt;img title="image" border="0" alt="image" src="http://www.simple-talk.com/blogbits/CharlesLee/SharePointIntegerFieldColumn_D0AD/image_thumb_3.png" width="457" height="168" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;However when you are recreating this as a feature defined in CAML (Collaborative Application Mark-up Language), which is a type of XML (more on this in my article) then you do not get such a rich experience.&amp;#160; You would need to add something like this to the element manifest defined in your feature:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;&amp;lt;Field SourceID=&amp;quot;&lt;/font&gt;&lt;font face="Courier New"&gt;http://schemas.microsoft.com/sharepoint/3.0&amp;quot;&lt;/font&gt;    &lt;br /&gt;&lt;font face="Courier New"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ID=&amp;quot;{C272E927-3748-48db-8FC0-6C7B72A6D220}&amp;quot;     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Group=&amp;quot;My Site Columns&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Name=&amp;quot;MyNumber&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; DisplayName=&amp;quot;My Number&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Type=&amp;quot;Numeric&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Commas=&amp;quot;FALSE&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Decimals=&amp;quot;0&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Required=&amp;quot;FALSE&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ReadOnly=&amp;quot;FALSE&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Sealed=&amp;quot;FALSE&amp;quot;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Hidden=&amp;quot;FALSE&amp;quot; /&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;OK, its not as nice as the browser UI but I can deal with this.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Hang on.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Commas="FALSE" and yet for my number 1234 I get 1,234.&amp;#160; That is not what I wanted or expected.&amp;#160; What gives?&lt;/p&gt;  &lt;p&gt;The answer lies in the difference between a type of "Numeric" which is an implementation of the &lt;font face="Courier New"&gt;SPFieldNumber&lt;/font&gt; class and "Integer" which does not correspond to a given &lt;font face="Courier New"&gt;SPField &lt;/font&gt;class but rather represents a positive or negative integer.&amp;#160; The numeric type does not respect the settings of Commas or NegativeFormat (which defines how to display negative numbers.)&amp;#160; So we can set the Type to Integer and we are good to go.&amp;#160; Yes?&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Sadly no!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You will notice at this point that if you deploy your site column into SharePoint something has gone wrong.&amp;#160; Your site column is not listed in the Site Column Gallery.&amp;#160; The deployment must have failed then?&amp;#160; But no, a quick look at the site columns via the API reveals that the column is there.&amp;#160; What new evil is this?&amp;#160; Unfortunately the base type for integer fields has this lovely attribute set on it:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;UserCreatable = FALSE&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;So WSS 3.0 accordingly hides your field in the gallery as you cannot create fields of this type.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;However!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You can use them in content types just like any other field (except not in the browser UI), and if you add them to the content type as part of your feature then they will show up in the UI as a field on that content type.&amp;#160; &lt;/p&gt;  &lt;p&gt;Most of the time you are not going to be too concerned that your site columns are not listed in the gallery as you will know that they are there and that they are still useable. So not as bad as you thought after all.&amp;#160; Just a little quirky.&amp;#160; But that is SharePoint for you.&lt;/p&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=90071" width="1" height="1"&gt;</description></item><item><title>SharePoint: Where have my content types gone?</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2010/02/02/89182.aspx</link><pubDate>Tue, 02 Feb 2010 07:00:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:89182</guid><dc:creator>CharlesLee</dc:creator><slash:comments>0</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/89182.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=89182</wfw:commentRss><description>&lt;p&gt;Have all your SharePoint site columns and content types ever mysteriously vanished from your site collection?&amp;#160; What could cause this catastrophe to occur?&lt;/p&gt;  &lt;p&gt;At one time or another when you are developing solutions for SharePoint (MOSS 2007/WSS 3.0) you will be creating and deleting site collections regularly in order to test a piece of functionality.&amp;#160; It is quite possible that you have done this before so you'll know what I am talking about.&lt;/p&gt;  &lt;p&gt;One thing that might scare you a little is if you click on Site Settings &amp;gt; Site Content Types and you're faced with the following:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/Wherehavemycontenttypesgone_B95C/image.png"&gt;&lt;img title="image" border="0" alt="image" src="http://www.simple-talk.com/blogbits/CharlesLee/Wherehavemycontenttypesgone_B95C/image_thumb.png" width="373" height="156" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;By this point panic has set in and you are surely either running around the room like a headless chicken or else you have put your coat on and are heading for the nearest high street coffee emporium.&lt;/p&gt;  &lt;h3&gt;Where are my Content Types?&lt;/h3&gt;  &lt;p&gt;You will notice that the same is true of your Site Columns too!&amp;#160;&amp;#160; Wait, come back. Take off that coat, you can get a coffee in a minute.&lt;/p&gt;  &lt;p&gt;The solution is simple and could easily be solved with one simple thing.&amp;#160; Time.&amp;#160; The Site Content Type Gallery and the Site Column Gallery are both cached on the WFE and this is only updated via a timer job.&amp;#160; Because you have just deleted and recreated a site collection on the exact same URL as a previously existing one this timer job has not yet run to re-populate this cache.&amp;#160; I think this is the &lt;font face="Courier New"&gt;ConfigRefresh&lt;/font&gt; job, but I am not certain. &lt;/p&gt;  &lt;p&gt;If you want to be sure then you can run the following command on your server(s) and you will see that all the site columns and content types will come straight back:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;iisreset -noforce&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Of course if you just wait then the timer job will run and all will be well.&lt;/p&gt;  &lt;p&gt;This one has caught me out before, so hopefully this will help someone out and stop them running for coffee instead of doing a simple iisreset.&lt;/p&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=89182" width="1" height="1"&gt;</description><category domain="http://www.simple-talk.com/community/blogs/charleslee/archive/category/1025.aspx">SharePoint</category><category domain="http://www.simple-talk.com/community/blogs/charleslee/archive/category/1030.aspx">WSS 3.0</category></item><item><title>The Upgrade Path to SharePoint 2010</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2010/01/22/88088.aspx</link><pubDate>Fri, 22 Jan 2010 07:00:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:88088</guid><dc:creator>CharlesLee</dc:creator><slash:comments>3</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/88088.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=88088</wfw:commentRss><description>&lt;p&gt;If your looking at the public beta of SharePoint 2010 and thinking, "We are going to need to upgrade, but where do I start?" then hopefully this basic guide should help you on how to plan and what action to take in preparation for an upgrade.&lt;/p&gt;  &lt;h3&gt;Upgrade vs. Migration&lt;/h3&gt;  &lt;p&gt;In my view there are two significantly different approaches to an upgrade.&amp;#160; One would be a traditional upgrade where you are upgrading your existing infrastructure and then upgrading your binaries and content.&amp;#160; The other would be creating a new infrastructure entirely and then migrating all your content from one to the other (upgrading it in the process.)&amp;#160; The benefit to this approach being that you are not taking any excess baggage with you (see below.)&amp;#160; Both approaches have significant advantages and disadvantages and will probably come down to issues of budget or politics or both any way.&amp;#160; I am going to look at preparing your environment for a traditional upgrade.&lt;/p&gt;  &lt;h3&gt;Planning, planning, planning and more. you guessed it!&lt;/h3&gt;  &lt;ol&gt;   &lt;li&gt;Document your environment thoroughly.&amp;#160; You cannot upgrade effectively if you don't know what you have to begin with.&amp;#160; If you already have documentation then make sure it is up to date.      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Initiate some thorough performance analysis on you hardware.&amp;#160; If it's not performing great then this is the time to be putting in budget requests for new kit and planning your infrastructure upgrades.&amp;#160; Management like figures so get some raw stats in place to back up your requests.      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Customisations - ensure they are documented thoroughly (as above) check your infrastructure for rogue customisations that you might not be aware of.&amp;#160; Look in the GAC, 12 Hive, Add/Remove Programs, Solutions store, and anywhere else for undocumented customisations.&amp;#160;&amp;#160; If you use 3rd party tools/add-ons then contact your ISV.&amp;#160; What are their plans for 2010?&amp;#160; What is their roadmap for these?&amp;#160; Does it fit in with your plans?      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Put together an Upgrade Strategy.&amp;#160; It will make more sense if you get it all down on paper and it will allow you to see any gaps or issues.&amp;#160; Show it to other stakeholders and get some feedback you are guaranteed to have missed something.      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;There are lots of stakeholders and interested parties who are going to need to know what is happening when.&amp;#160; Create a communications plan. Who will be told what and when.      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;An upgrade to 2010 is going to have an impact on end users (obviously), so create a training plan.&amp;#160; Who will be trained when and to what level, and who will deliver that training.&amp;#160; Costs should be built into budget plans for this year.      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Consider some of the other issues at this time:      &lt;ul&gt;       &lt;li&gt;Are you going to install a sand box for the developers to play with? &lt;/li&gt;        &lt;li&gt;Are you going to run a pilot scheme? &lt;/li&gt;        &lt;li&gt;Are you going to run concurrent 2007/2010 environments?          &lt;br /&gt;&lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;Preparing your environment&lt;/h3&gt;  &lt;ol&gt;   &lt;li&gt;Are your MOSS 2007 (or WSS) environments up to at least SP2?&amp;#160; I would say get them to at least the latest CU (December CU at the moment.)      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Run the upgrade check tool that has been provided in SP2 (that is why it is there).&amp;#160; The command is &lt;font face="Courier New"&gt;stsadm -o preupgradecheck&lt;/font&gt;.&amp;#160; This will generate a HTML report (similar to that shown below) which will details any issues that should be fixed prior to an upgrade.       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/TheUpgradePathtoSharePoint2010_A222/image.png"&gt;&lt;img title="image" border="0" alt="image" src="http://www.simple-talk.com/blogbits/CharlesLee/TheUpgradePathtoSharePoint2010_A222/image_thumb.png" width="244" height="185" /&gt;&lt;/a&gt;       &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Deal with the issues raised above&lt;/strong&gt;.&amp;#160; The tool has been written for a reason, if you don't deal with all the issues raised by this tool in some way then you are setting yourself up for a fall.       &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Offload all your excess baggage.&amp;#160; And by this I mean go through your environments and remove any templates, features and site definitions which are not being used.&amp;#160; You can always restore them to the new farm later if need be.&amp;#160; Also check your server event logs and ULS logs.&amp;#160; Ensure that all recurring issues are fixed before you upgrade.&amp;#160; Additionally archive any unused sites (do not delete them though, just in case!)      &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;Upgrading the infrastructure&lt;/h3&gt;  &lt;ol&gt;   &lt;li&gt;All your servers are going to need to be running on 64 bit OS, so the majority of older farms are going to need full OS installations on all the servers.      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Look back at the performance analysis you did in the planning phase, can you see any areas that require beefing up.&amp;#160; Need more RAM in your indexing server?&amp;#160; Might it be best to perform your indexing on a physical box where before it coped on a VM?      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;How are you going to upgrade all this hardware?&amp;#160; The easiest way is to add a new server in to your farm and then 'swing' each of the old servers out one at a time to be blown away and rebuilt as the specifications demand.&amp;#160; The new server is there to handle some of the excess load from the different servers as your remove them.      &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;Testing    &lt;br /&gt;&lt;/h3&gt;  &lt;ol&gt;   &lt;li&gt;Test every step of your upgrade path in a non-production environment first.&amp;#160; &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;If you have the resources then build an evaluation farm as an exact replica of your live environment.&amp;#160; You can then use this to test out your upgrade strategy to ensure all works as planned.      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Once you have performed an evaluation upgrade then review it and ensure that everything went to plan.&amp;#160; Revise your plans of the back of this evaluation.      &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;What about the dev team?&lt;/h3&gt;  &lt;ol&gt;   &lt;li&gt;Don't forget to plan an upgrade of your dev and testing platforms.      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Does you dev team now need 64 bit desktops or are they going to develop on VM?      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Will you upgrade the dev team to Visual Studio 2010?&amp;#160; The tooling is significantly improved, so I would say that should be a big 'yes'.      &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;Other issues to consider    &lt;br /&gt;&lt;/h3&gt;  &lt;ol&gt;   &lt;li&gt;IE6 support has been dropped in SP2010, this will have a dramatic effect on your content authors /contributors if they are still running on IE6.&amp;#160; Upgrade!      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;This would be a great time to revisit your Information Architecture using some of the new support for managed meta data and importing taxonomies.&amp;#160; Separate project, but seriously now is the time!      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Same goes for look and feel really.&amp;#160;&amp;#160; Your sites will upgrade in 2007 rendering mode, but look to upgrade the visuals as soon as you can (it's only one button click, but you'll have to ensure that your CSS and JavaScript is set up to cope with some of the new web part renderings - that's what the evaluation farm is there for though.)      &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;h3&gt;Essentially the upgrade path comes down to three things. &lt;/h3&gt;  &lt;ol&gt;   &lt;li&gt;Plan everything      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Prepare for anything      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Test everything      &lt;br /&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I hope that this little whistle-stop tour of the upgrade path has helped.&amp;#160; If nothing else it means that I have got all this stuff down to refer to myself.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&amp;#160;&lt;a href="http://www.simple-talk.com/community/blogs/charleslee/archive/2009/11/04/75999.aspx"&gt;Look here for more information on what is available in SharePoint 2010&lt;/a&gt;. &lt;/p&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=88088" width="1" height="1"&gt;</description></item><item><title>SharePoint: The security validation for this page is invalid</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2010/01/05/85440.aspx</link><pubDate>Tue, 05 Jan 2010 07:00:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:85440</guid><dc:creator>CharlesLee</dc:creator><slash:comments>1</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/85440.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=85440</wfw:commentRss><description>&lt;p&gt;Happy new year to you all.&amp;#160; I am starting off 2010 with an article I have been meaning to write for ages, it addresses an error that has come up several times whilst I have been developing solutions that operate outside of the parameters of a standard SharePoint customisation. Quite often when developing this type of solution I have come across this error message: &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;The security validation for this page is invalid&lt;/strong&gt;&lt;/em&gt;&amp;#160; &lt;/p&gt;  &lt;p&gt;Its not the greatest error message in the world as its meaning is ambiguous and that is never good with error messages.&amp;#160; For one thing you might not actually be developing a page. You will come across this same error when using the code in a console application or in a web service.&amp;#160; In fact you are more likely to come across it in those scenarios given that the absence of the digest controls which SharePoint implements is usually the root cause of the issue.&lt;/p&gt;  &lt;p&gt;Some classes and methods which you may call in a bit of custom code require that SharePoint performs a security validation to ensure that the call is coming from a legitimate SharePoint source.&amp;#160; There are two different kinds of validation depending upon the type of action being taken and therefore two different solutions to this issue.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Updating a site or site collection using the &lt;font face="Courier New"&gt;SPWeb&lt;/font&gt; and &lt;font face="Courier New"&gt;SPSite&lt;/font&gt; classes.&lt;/font&gt;       &lt;br /&gt;&lt;/strong&gt;    &lt;br /&gt;You may be using code to similar to this when seeing this issue:     &lt;br /&gt;    &lt;br /&gt;&lt;font face="Courier New"&gt;Using site As New SPSite(URL)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Dim list As SPList = GetList(&amp;quot;listname&amp;quot;)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Dim listItem As SPListItem = list.Items.Add()       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; listItem(&amp;quot;Title&amp;quot;) = &amp;quot;Test Item&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; listItem.Update()       &lt;br /&gt;End Using&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This code could fail with the above error for two reasons.&amp;#160; Firstly you are using a function to retrieve the SPList object and this could well be the cause.&amp;#160; The solution here is to put the code to get the required SPList object within the same Using statement.&lt;/p&gt;  &lt;p&gt;The second problem is that you have not prepared for a potentially 'unsafe' operation.&amp;#160; This can be resolved by setting the AllowUnsafeUpdates property on your SPSite and SPWeb objects.&lt;/p&gt;  &lt;p&gt;A better code sample for this operation would be:&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Using site As New SPSite(URL)      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; site.AllowUnsafeUpdates = True       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Using web As SPWeb = site.OpenWeb       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; web.AllowUnsafeUpdates = True       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim list As SPList = web.Lists(&amp;quot;listname&amp;quot;)       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim listItem As SPListItem = list.Items.Add()       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; listItem(&amp;quot;Title&amp;quot;) = &amp;quot;Test Item&amp;quot;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; listItem.Update()       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End Using       &lt;br /&gt;End Using&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;This is a much safer and more secure method of performing the same operation, but this method should not cause the security validation error.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;Site collection administration operations&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Code which uses classes and methods from the Microsoft.SharePoint.Administration namespace can often fall foul of this security validation error.&amp;#160; Especially code which creates or deletes site collections as these methods tend to require a more global form digest&amp;#160; to be present on the requesting page.&lt;/p&gt;  &lt;p&gt;You can however disable the requirement for this security validation at the web application level in order to allow code executing in a different scenario to complete successfully.&lt;/p&gt;  &lt;p&gt;The following code example disables the form digest requirement prior to creating a new site collection, but then restores it to its previous state once the process is complete.&amp;#160; It is important to restore the original setting as we will not know what it was set to prior to this code running.&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;Dim webapp As SPWebApplication = SPWebApplication.Lookup(New Uri(URL)) &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;'Save the current settings      &lt;br /&gt;Dim CurrentFormDigestSettings As Boolean = webapp.FormDigestSettings.Enabled&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;'disable the form digest validation      &lt;br /&gt;webapp.FormDigestSettings.Enabled = False &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;'create the new site collection      &lt;br /&gt;Dim spSites As SPSiteCollection = webapp.Sites       &lt;br /&gt;webapp.Sites.Add(FullURL, Name, Description, nLCID, Nothing, OwnerLogin, OwnerName, OwnerEmail)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;'restore the original setting&amp;#160; &lt;br /&gt;webapp.FormDigestSettings.Enabled = CurrentFormDigestSettings&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Disabling the &lt;font face="Courier New"&gt;FormDigestSettings.Enabled&lt;/font&gt; property should allow this code to execute safely out side of the 'expected' method that SharePoint defaults to.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;What not to do!&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There are various articles out on the internet detailing methods to resolve this error and some of them make reference to switching off security validation for the entire web application.&amp;#160; This can be done by changing the settings found at Central Administration &amp;gt; Application Management &amp;gt; Web Application General Settings&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/SharePointThesecurityvalidationforthispa_A318/image.png"&gt;&lt;img title="image" border="0" alt="image" src="http://www.simple-talk.com/blogbits/CharlesLee/SharePointThesecurityvalidationforthispa_A318/image_thumb.png" width="377" height="113" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This is not an approach that I would recommend.&amp;#160; You are compromising the security of an entire web application in order to allow a piece of custom code to function and that way bad things live.&amp;#160; Much better to take some time, review your code and ensure that you are writing appropriate code for your problem.&lt;/p&gt;  &lt;p&gt;Hopefully this has helped you resolve the issue, or helped you to avoid ever running into it in the first place. &lt;/p&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=85440" width="1" height="1"&gt;</description><category domain="http://www.simple-talk.com/community/blogs/charleslee/archive/category/1025.aspx">SharePoint</category><category domain="http://www.simple-talk.com/community/blogs/charleslee/archive/category/1030.aspx">WSS 3.0</category></item><item><title>Deploying InfoPath templates within MOSS 2007</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2009/12/14/79075.aspx</link><pubDate>Mon, 14 Dec 2009 07:00:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:79075</guid><dc:creator>CharlesLee</dc:creator><slash:comments>2</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/79075.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=79075</wfw:commentRss><description>&lt;p&gt;I am going to start with a quote that I want everyone to remember.&amp;#160; It should be in the mind of anyone developing InfoPath solutions for SharePoint. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;"Never, ever publish an InfoPath form directly from InfoPath into a production SharePoint environment."&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I have seen this too many times and it will make your administrators really rather grumpy.&amp;#160; The reason is that although InfoPath will package your form up in a WSP (that's a good thing), unfortunately it will give the WSP and the associated feature a GUID for a name (although the feature will display an appropriate friendly name in the UI.)&amp;#160; &lt;/p&gt;  &lt;p&gt;What's the problem with that?&amp;#160; Well, the problem will come when you try and find the WSP or feature that deploys your form because you want to make some change.&amp;#160; You'll end up trawling through the feature directory to find the folder which contains your template.&lt;/p&gt;  &lt;p&gt;A much better solution is to develop your own feature to deploy your form template, and to do this is really rather simple, &lt;a href="http://blah.winsmarts.com/2008-8-Deploying_InfoPath_2007_Forms_to_Forms_Server_-and-ndash_Properly.aspx" target="_blank"&gt;more information can be found here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The real benefit to deploying your templates in this fashion is that you can deploy your feature within your own WSP.&amp;#160; Rarely have I come across a SharePoint project which is just a single InfoPath form,&amp;#160; more likely it's a series of forms, or more often a form as part of a wider solution involving workflow, event receivers and other components.&amp;#160; Therefore being able to bundle this feature in with other components in your WSP can prove invaluable. &lt;/p&gt;  &lt;h4&gt;What happens during feature deployment?&lt;/h4&gt;  &lt;p&gt;If you have followed the instructions within the article above then you will be using a feature which utilises the &lt;font face="Courier New"&gt;XsnFeatureReceiver&lt;/font&gt; class from within the &lt;font face="Courier New"&gt;Microsoft.Office.InfoPath.Server&lt;/font&gt; assembly.&amp;#160; But what does this feature receiver actually do?&amp;#160; It has two functions as far as I can tell:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;In the &lt;font face="Courier New"&gt;FeatureInstalled &lt;/font&gt;event of the feature receiver any .xsn files included within the feature are registered to the farm using the &lt;font face="Courier New"&gt;RegisterFormTemplate&lt;/font&gt; method of the &lt;font face="Courier New"&gt;FormTemplateCollection.&lt;/font&gt;&amp;#160; These will then show up in Manage Form Templates within Central Administration.      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;In the &lt;font face="Courier New"&gt;FeatureActivated&lt;/font&gt; event of the feature receiver (this is run when you activate the appropriate feature in Site Collection Features) the form template is copied to the &lt;font face="tah"&gt;FormServerTemplates&lt;/font&gt; directory within the root web of the site collection.&amp;#160; At the same time a site content type is created which uses this template and which includes the fields promoted within the template.&amp;#160; It's more difficult to know exactly what this code is doing as the code has been obfuscated.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;These are just some insights and thoughts around this process.&amp;#160; There does seem to be a lot of information out there but I cannot find one clear guide on the whole process.&amp;#160; This might be a subject for a future article.&lt;/p&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=79075" width="1" height="1"&gt;</description><category domain="http://www.simple-talk.com/community/blogs/charleslee/archive/category/1025.aspx">SharePoint</category></item><item><title>Initiate a SharePoint workflow from a button on the list view.</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2009/11/24/77727.aspx</link><pubDate>Tue, 24 Nov 2009 07:00:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:77727</guid><dc:creator>CharlesLee</dc:creator><slash:comments>18</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/77727.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=77727</wfw:commentRss><description>&lt;p&gt;I came across a scenario recently where a project required that a list of items could have a button or link on a list view, which would cause a workflow to start. &lt;/p&gt;  &lt;p&gt;Essentially the users involved were not happy using the out-of-the-box way that SharePoint (WSS 3.0) allows users to manually initiate workflows. They believed there were too many steps involved. &lt;/p&gt;  &lt;p&gt;After a bit of searching, I came up with a method involving the use of a hyperlink column on the list in question, coupled with a very simple workflow. I will outline the steps involved in this process below. This is not the most graceful solution I am sure, but it is a simple solution to what can be a tricky problem. &lt;/p&gt;  &lt;p&gt;How was it done? &lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; I am assuming that you have a simple workflow attached to a list, if not then please create a simple SharePoint Designer workflow. &lt;/em&gt;&lt;a href="http://www.simple-talk.com/dotnet/.net-tools/how-to-create-custom-workflows-in-windows-sharepoint-services-3.0/" target="_blank"&gt;&lt;em&gt;You can see how to do this here&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;1. Add a new hyperlink column to your list, this is going to represent the button which users click on to start the workflow, so give the column an appropriate name.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/CreateWFColumn.png"&gt;&lt;img title="CreateWFColumn" border="0" alt="CreateWFColumn" src="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/CreateWFColumn_thumb.png" width="219" height="323" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;2. Click on the list settings for your list and select 'Advanced settings', ensure that 'Allow management of content types' is set to 'Yes'. This will allow us to hide the hyperlink column from the forms involved, if your list is a custom list then you may be able to go to 'Form settings' within list settings and make more detailed amendments to what appears on the new, display and edit forms.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/ManageCTs.png"&gt;&lt;img title="ManageCTs" border="0" alt="ManageCTs" src="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/ManageCTs_thumb.png" width="514" height="40" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;3. In the 'Content Types' section of the 'List Settings' page, click on the content type for your list. Then click on the name of your column. On the 'Change List Content Type Column' page click on the radio button for 'Hidden'. Click 'OK' and return to your list, you should see an empty space for your new column. However if you click on 'New' or try to edit an existing item your column should not display.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/HideColumn.png"&gt;&lt;img title="HideColumn" border="0" alt="HideColumn" src="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/HideColumn_thumb.png" width="304" height="225" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;4. I have a simple workflow attached to this list. This basic workflow merely adds an entry to the workflow history list saying 'Workflow started OK'. I assume your workflow is going to be slightly more complex, however the principle is the same. If you click on an item in your list (if you don't have one then create a quick test entry), and select the 'Workflows' icon from the item toolbar. Now click on the name of your workflow. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/ItemToolbar.png"&gt;&lt;img title="ItemToolbar" border="0" alt="ItemToolbar" src="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/ItemToolbar_thumb.png" width="536" height="28" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;5. You should now be looking at the initiation page which SharePoint Designer has created for us, now this page can be customised to say whatever you wish via SharePoint Designer, but I am going to leave it as the default for now. The important part here is the URL and parameters.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/WFInit.png"&gt;&lt;img title="WFInit" border="0" alt="WFInit" src="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/WFInit_thumb.png" width="518" height="51" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The URL of this page will be something similar to:&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;http://SITE URL/List Name/Workflows/Workflow Name/Workflow Name.aspx&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;and it should have 4 URL parameters, these are as follows:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;List&lt;/strong&gt;       &lt;br /&gt;The guid which identifies the list involved. This will not change for each link required on our list.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;ID&lt;/strong&gt;       &lt;br /&gt;The numerical ID of the list item involved. This is the key to making this process work.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;TemplateID&lt;/strong&gt;       &lt;br /&gt;The guid of the workflow to be initiated. This will not change for each link required on our list. Note: This guid, unlike the list guid above requires the braces {}, though these may be url encoded (so don't be surprised to see the guid starting %7B which is { when URL encoded).&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;Source&lt;/strong&gt;       &lt;br /&gt;The referring URL, responses will be redirected back to here once the workflow is successfully started.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;You can probably see that we could manipulate this URL to generate a link for our new hyperlink column by simply altering the ID parameter being sent to this page. How can we do this? We simply use another workflow!&lt;/p&gt;  &lt;p&gt;6. Ensure you have copied the URL from step 5 to the clipboard. Open SharePoint Designer and create a new workflow for this site. This simple workflow should be set to 'Automatically start this workflow when a new item is created' only.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/WF1.png"&gt;&lt;img title="WF1" border="0" alt="WF1" src="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/WF1_thumb.png" width="336" height="205" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;7. Click 'Next' and then add a 'Build Dynamic String' action click on 'dynamic string' and paste your URL into the 'String Builder' window. Find the ID parameter and delete the value which you had pasted in. Leaving the cursor in this location click on 'Add Lookup' and select the 'ID' column of the 'Current Item'.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/WFLookup.png"&gt;&lt;img title="WFLookup" border="0" alt="WFLookup" src="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/WFLookup_thumb.png" width="374" height="311" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click 'OK'. Your URL should now look similar to that shown above. At the end of the URL add a comma (,) followed by the text which you want your hyperlink column to display in the list view. For example I have added ', Start my workflow'. There must be a space between your comma and your link text. Otherwise you will get the entire URL as the text for your hyperlink!&lt;/p&gt;  &lt;p&gt;Click 'OK' again.&lt;/p&gt;  &lt;p&gt;8. Add another action to 'Update List Item' and with Current Item selected click on 'Add'. The 'Value Assignment' dialog will allow you to assign your new hyperlink column to the value of the URL string we have just generated. Select your new hyperlink column from the 'Set this field:' list. Next to the 'To this value:' list select the 'fx' button. In the 'Source:' drop down select 'Workflow Data' and in the 'Field:' select your variable (probably named with the default 'Variable: variable')&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/WFVariable.png"&gt;&lt;img title="WFVariable" border="0" alt="WFVariable" src="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/WFVariable_thumb.png" width="310" height="133" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/ValueAssign.png"&gt;&lt;img title="ValueAssign" border="0" alt="ValueAssign" src="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/ValueAssign_thumb.png" width="244" height="144" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Click 'OK' then 'OK' again on the 'Value Assignment' dialog. The 'Update List Item' dialog should now show this field and value in the list of items to be updated. Click 'OK' again.&lt;/p&gt;  &lt;p&gt;9. We can now click 'Finish' to complete our simple workflow. SharePoint Designer will now generate the required files and bind this workflow to your list.&lt;/p&gt;  &lt;p&gt;10. Go to your list and click on 'New' in the list toolbar, complete a test item (noting that your hyperlink column is not listed). Click 'OK' and you should return to your list view and your hyperlink column should be populated with the display value you entered in stage 7.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/ListView.png"&gt;&lt;img title="ListView" border="0" alt="ListView" src="http://www.simple-talk.com/blogbits/CharlesLee/4c03d2ffe3e8_B715/ListView_thumb.png" width="539" height="53" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Clicking on this hyperlink should take you to the initiation page that SharePoint Designer created for you, but (crucially) the ID will be the ID for the item which the hyperlink column exists on.&lt;/p&gt;  &lt;p&gt;Clicking 'Start' on this page will start your workflow as designed in SharePoint Designer.&lt;/p&gt;  &lt;p&gt;So there you go! Wait for it.There are a few buts.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Issues&lt;/strong&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;1. Document Libraries with check in/out enabled &lt;/strong&gt;      &lt;br /&gt;This is the same as designing any workflow which is going to update these items, you must handle checking in/out. Because our workflow is only initiated on creation then this is not a major issue. I did come across some problems in this scenario, but they were overcome by having the workflow check the item back in before updating.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;2. Custom Workflow&lt;/strong&gt;       &lt;br /&gt;This workaround is designed for dealing with either SharePoint Designer workflows or custom workflows which use an initiation form as SPD always creates a workflow initiation form anyway. It will not work for custom workflows that do not require an initiation form as there is no URL to link to (This is a scenario that I am interested in so if anyone has any recommendations then please post a comment). If your custom workflow uses an InfoPath form to initiate then you might want to look at creating links to the following URL:&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;em&gt;http://SITE URL/_layouts/IniWrkflIP.aspx&lt;/em&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This page takes similar parameters to the SPD generated page except you can supply an xsn location for your InfoPath form too. &lt;a href="http://msdn.microsoft.com/en-us/library/ms563325.aspx"&gt;More information can be found here&lt;/a&gt;. The above technique should work perfectly well in this scenario, I just haven't tried it.&lt;/p&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=77727" width="1" height="1"&gt;</description></item><item><title>Using the JQuery dialog widget in a custom SharePoint web part</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2009/11/11/76198.aspx</link><pubDate>Wed, 11 Nov 2009 10:00:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:76198</guid><dc:creator>CharlesLee</dc:creator><slash:comments>20</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/76198.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=76198</wfw:commentRss><description>&lt;p&gt;If you have played around with the dialog widget in &lt;a href="http://jqueryui.com/" target="_blank"&gt;JQuery UI&lt;/a&gt; you may have noticed a couple of things.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Like a lot of JavaScript libraries it messes with the DOM (Document Object Model) at what might be unexpected times and therefore it does not play well with SharePoint.      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;It breaks the web part verb menu (the 'edit' drop down menu) &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Actually it (like a lot of the JQuery UI widgets) is an incredibly powerful tool to your client side arsenal, and as long as you adhere to some best practice it will work perfectly happily within SharePoint, or any other ASP.Net site.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. It messes with the DOM.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Specifically it does not play well with the ASP.Net page post back model. This is fairly well documented across the Interweb (although the actual solution is not).&lt;/p&gt;  &lt;p&gt;The dialog widget is initiated via code similar to this:&lt;/p&gt;  &lt;pre&gt;$('#dialog').dialog();&lt;/pre&gt;

&lt;p&gt;When JQuery sees this it initiates the widget and actually moves your entire div tag to the root of the DOM (see screenshot below). Therefore outside of the form tag. So any ASP.Net controls which you may have in this div will not be included in any post backs therefore none of their events will fire.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/BestPracticeUsingtheJQuerydialogwidgetin_C42A/JQueryDialogDOM.png"&gt;&lt;img title="JQueryDialogDOM" border="0" alt="JQueryDialogDOM" src="http://www.simple-talk.com/blogbits/CharlesLee/BestPracticeUsingtheJQuerydialogwidgetin_C42A/JQueryDialogDOM_thumb.png" width="346" height="92" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Never fear however as this is easily fixed by moving the parent element of your div, which will be another div which is created by JQuery and putting this at the root of the form instead (see code sample below).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. It breaks the web part 'edit' menu.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Actually it doesn't. But if you have followed some code examples that are out there then it might. Essentially it may mess with this if your call to initiate the dialog is happening before the page has entirely loaded.&lt;/p&gt;

&lt;p&gt;Fortunately JQuery has a handy way of ensuring that no matter where your code is defined on the page it will only run when the page has loaded up. This is simply accessed using:&lt;/p&gt;

&lt;pre&gt;$(document).ready();&lt;/pre&gt;

&lt;p&gt;Any function supplied to this method will be loaded in memory and run when the page has finished loading. How great is that!&lt;/p&gt;

&lt;p&gt;As long as you follow these two items of best practice you should have no problems using the JQuery dialog widget from within SharePoint.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Code&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following code example is how I would use the dialog widget. At some point you need to run the &lt;font face="Courier New"&gt;initiateModalDialog&lt;/font&gt; method passing in the id of the div to use as a dialog. This will then run when the page is loaded and will initiate your dialog. &lt;/p&gt;

&lt;p&gt;When you want to show it then call &lt;font face="Courier New"&gt;openModalDialog&lt;/font&gt; and optionally (because JQuery will render a nice close button in the top tight hand corner) you could call &lt;font face="Courier New"&gt;closeModalDialog&lt;/font&gt; to close it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; If you are using this within a web part then make sure your selector (the id of your div) is unique to your web part in case you have multiple web parts on the same page.&lt;/p&gt;

&lt;pre&gt;function initiateModalDialog(selector) {

&lt;font color="#008000"&gt;//initiates the dialog when the page has finished loading&lt;/font&gt;
$(document).ready(function() {    

    $('#' + selector).dialog({   
        autoOpen: false,   
        bgiframe: true,    
        draggable: false,   
        width: 600,   
        resizable: false,   
        modal: true,   
        show: 'slide' 

    });  

}); 

}

&lt;font color="#008000"&gt;//Opens the selected div as a modal dialog&lt;/font&gt;
function openModalDialog(selector) {

    &lt;font color="#008000"&gt;//Opens the dialog&lt;/font&gt;
    $('#' + selector).dialog('open');           

    &lt;font color="#008000"&gt;//Appends the dialog to the ASP.Net form to allow postbacks&lt;/font&gt;
    $('#' + selector).parent().appendTo($(&amp;quot;form:first&amp;quot;));   
}    

&lt;font color="#008000"&gt;//Closes the selected div dialog&lt;/font&gt;
function closeModalDialog(selector) {           
    $('#' + selector).dialog('close');  
}&lt;/pre&gt;

&lt;p&gt;Obviously the options which are passed to the initiation method such as 'draggable' and 'resizable' are up to you, but for this to work you must set &lt;font face="Courier New"&gt;autoOpen&lt;/font&gt; to false otherwise your dialog will open straight away (unless that is what you intended of course). &lt;/p&gt;

&lt;p&gt;For further information please read the&lt;strong&gt; &lt;/strong&gt;&lt;a href="http://docs.jquery.com/UI/Dialog"&gt;JQuery UI dialog widget documentation. 
    &lt;br /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=76198" width="1" height="1"&gt;</description><category domain="http://www.simple-talk.com/community/blogs/charleslee/archive/category/1025.aspx">SharePoint</category></item><item><title>SharePoint 2010 - What to look forward to.</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2009/11/04/75999.aspx</link><pubDate>Wed, 04 Nov 2009 10:44:24 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:75999</guid><dc:creator>CharlesLee</dc:creator><slash:comments>3</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/75999.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=75999</wfw:commentRss><description>&lt;p&gt;For many months now the intricate details of what's under the bonnet (that's the hood to all US readers) of SharePoint 2010 has been for a select bunch of SharePoint MVPs and Microsoft partners, and it has been protected by an NDA (Non-Disclosure Agreement) threatening to bring the world down around the ears of any who should divulge these secrets.&lt;/p&gt;  &lt;p&gt;However, the twittering for &lt;a href="http://search.twitter.com/search?q=%23spc09" target="_blank"&gt;#SPC09&lt;/a&gt; (SharePoint Conference 2009) has died down, the casino tables of Vegas have emptied (at least of SharePoint bods anyway) and that can only mean one thing.&lt;/p&gt;  &lt;p&gt;The word is out.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;The NDA is no more!&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;And blimey have the jungle drums been beating.&amp;#160; Every MVP, Microsoft partner and SharePoint blogger&amp;#160; (even Microsoft have published some stuff) from here to somewhere very far from here, have been blogging, chatting and spilling the proverbial beans on SharePoint 2010. &lt;/p&gt;  &lt;p&gt;So am I going to do the same? No.&amp;#160; I am just going to highlight the best of theirs instead.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com" target="_blank"&gt;MSDN&lt;/a&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://mssharepointdeveloper.com/" target="_blank"&gt;Getting Started Developing on SharePoint 2010&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ee658239.aspx" target="_blank"&gt;SharePoint 2010 Technical Articles&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/sharepoint/default.aspx" target="_blank"&gt;SharePoint 2010 Developer Center&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/dd441784.aspx" target="_blank"&gt;SharePoint 2010 Walkthroughs&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://www.andrewconnell.com/blog/Default.aspx" target="_blank"&gt;Andrew Connell&lt;/a&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.andrewconnell.com/blog/archive/2009/10/19/the-new-service-application-architecture-in-sharepoint-server-2010.aspx" target="_blank"&gt;The New Service Application Architecture in SharePoint Server 2010&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.andrewconnell.com/blog/archive/2009/10/19/part-3-whats-new-with-sharepoint-server-2010-web.aspx" target="_blank"&gt;What's New with SharePoint Server 2010 Web Content Management&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a title="Title of this entry." href="http://www.andrewconnell.com/blog/archive/2009/10/19/part-2-whats-improved-with-sharepoint-server-2010-web.aspx" target="_blank"&gt;What's Improved with SharePoint Server 2010 Web Content Management&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.andrewconnell.com/blog/archive/2009/10/19/part-1-improvements-to-the-core-sharepoint-platform.aspx" target="_blank"&gt;Improvements to the Core SharePoint Platform &amp;amp; the Benefit to SharePoint 2010 Web Content Management&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://www.sharepointnutsandbolts.com" target="_blank"&gt;Chris O'Brien&lt;/a&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.sharepointnutsandbolts.com/2009/10/sp2010-developer-skills-preparation.html" target="_blank"&gt;SP2010 - developer skills preparation&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.harbar.net/" target="_blank"&gt;Spencer Harbar&lt;/a&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.harbar.net/articles/sp2010dt.aspx" target="_blank"&gt;SharePoint 2010: Developer Tools Overview&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Others&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?ID=44" target="_blank"&gt;List of SharePoint 2010 Web Parts&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://www.spfoxhole.com/Blog/Lists/Posts/Post.aspx?ID=132" target="_blank"&gt;SharePoint 2010 Central Admin.. Where is everything&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://www.thesanitypoint.com/archive/2009/10/27/sharepoint-2010-hits-the-jackpot.aspx" target="_blank"&gt;SharePoint 2010 Hits the Jackpot&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So read up and savour what's coming down the pipeline!&lt;/p&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=75999" width="1" height="1"&gt;</description></item><item><title>Using a People Picker in SharePoint Workflow Initiation</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2009/10/28/75810.aspx</link><pubDate>Wed, 28 Oct 2009 15:11:00 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:75810</guid><dc:creator>CharlesLee</dc:creator><slash:comments>25</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/75810.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=75810</wfw:commentRss><description>&lt;p&gt;Creating a workflow from SharePoint Designer is limiting in many ways, but it's also very quick and easy, and it covers a large majority of every day scenarios. One of the major flaws for me has always been the inability to select 'Person' as a data type for an initiation variable (assuming that this would render a nice people picker control in the initiation form and maybe pass back the User ID to the workflow).&lt;/p&gt;  &lt;p&gt;I have been determined to resolve this and have come up with a quick and easy fix using some bespoke client side code within the initiation form.&lt;/p&gt;  &lt;table align="center" cellpadding="2" cellspacing="0"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; In my workflow I actually want to send an email so I am doing a little more in the JavaScript. This only works because on this project UserID@domain.com is a valid email alias. However the techniques outlined here should assist anyone who needs people data into a workflow.&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;p&gt;First of all create a new SPD workflow. Give it a name and select your list. Ensure that 'Allow this workflow to be started manually' is checked (so we get an initiation form generated for us).&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;a href="/blogbits/CharlesLee/UsingaPeoplePickerinWorkflowInitiation_A837/CreateWorkflow.png"&gt;&lt;img title="CreateWorkflow" alt="CreateWorkflow" src="/blogbits/CharlesLee/UsingaPeoplePickerinWorkflowInitiation_A837/CreateWorkflow_thumb.png" width="244" border="0" height="191"&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;ol&gt;   &lt;li&gt;Select Initiation. and Add.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;In the Add Field dialog enter a Field name, in my case 'email' and select 'Single line of text'.      &lt;br&gt;      &lt;br&gt;&lt;a href="/blogbits/CharlesLee/UsingaPeoplePickerinWorkflowInitiation_A837/InitData.png"&gt;&lt;img title="InitData" alt="InitData" src="/blogbits/CharlesLee/UsingaPeoplePickerinWorkflowInitiation_A837/InitData_thumb.png" width="244" border="0" height="215"&gt;&lt;/a&gt;       &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Leave Default value blank and click on Finish. Then OK.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Back in your Workflow Designer click Next.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;In this simple example I am just going to send an email, so click Actions and select Send an email. Click on 'this message' to define your email.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Click the address book on the To: line and in the Select Users dialog select Workflow Lookup. and click Add &amp;gt;&amp;gt;.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Define your workflow lookup as Source: Workflow Data and Field: Initiation: email (or whatever you called your initiation variable)      &lt;br&gt;      &lt;br&gt;&lt;a href="/blogbits/CharlesLee/UsingaPeoplePickerinWorkflowInitiation_A837/WFLookup.png"&gt;&lt;img title="WFLookup" alt="WFLookup" src="/blogbits/CharlesLee/UsingaPeoplePickerinWorkflowInitiation_A837/WFLookup_thumb.png" width="244" border="0" height="106"&gt;&lt;/a&gt;       &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Click OK. Then OK again.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Enter a value in Subject: And also for the body text. Click OK.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Now click Finish as we are done creating this simple workflow.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;If you open up the folder structure which SPD has created under Workflows you will see that there should be three files created:      &lt;br&gt;      &lt;br&gt;      &lt;ol&gt;       &lt;li&gt;the xoml file &lt;/li&gt;        &lt;li&gt;an xml config file &lt;/li&gt;        &lt;li&gt;an aspx page          &lt;br&gt;          &lt;br&gt;&lt;a href="/blogbits/CharlesLee/UsingaPeoplePickerinWorkflowInitiation_A837/files.png"&gt;&lt;img title="files" alt="files" src="/blogbits/CharlesLee/UsingaPeoplePickerinWorkflowInitiation_A837/files_thumb.png" width="231" border="0" height="75"&gt;&lt;/a&gt;           &lt;br&gt;          &lt;br&gt;&lt;/li&gt;     &lt;/ol&gt;   &lt;/li&gt;    &lt;li&gt;The final one is the one we are interested in as this contains the initiation form for our workflow.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Double click on this so we can take a look.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;You will note that essentially this is a standard SharePoint page with a &lt;font face="Courier New"&gt;DataFormWebPart&lt;/font&gt; which is set up to pass the initiation data to our workflow. In this case we should have a single text box for our initiation variable.       &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;If you look at the code view you will see that various assemblies and namespaces have been included within this page already. Including the &lt;font face="Courier New"&gt;Microsoft.SharePoint.WebControls&lt;/font&gt; namespace which contains the &lt;font face="Courier New"&gt;PeopleEditor&lt;/font&gt; control. This is the key to getting people data from the users.       &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;In code view if you put some spaces above the &lt;font face="Courier New"&gt;DataFormWebPart&lt;/font&gt; definition then we can include this control on the page. Just copy the code below:       &lt;br&gt;      &lt;br&gt;&lt;font face="Courier New"&gt;&amp;lt;sharepoint:peopleeditor        &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; id="pplPicker"         &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat="server"         &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; allowempty="False"         &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; validatorenabled="True"         &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; onvaluechangedclientscript="SetPeopleValues()"         &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; allowtypein="False"&amp;gt;         &lt;br&gt;&amp;lt;/sharepoint:peopleeditor&amp;gt;         &lt;br&gt;        &lt;br&gt;&lt;/font&gt;&lt;/li&gt;    &lt;li&gt;Essentially this is adding the control to the page and setting some properties. The really important properties here are:      &lt;br&gt;      &lt;br&gt;&lt;font face="Courier New"&gt;OnValueChangedClientScript&lt;/font&gt;       &lt;br&gt;This property allows us to specify some client side JavaScript which we wish to run every time the value in the people picker is changed.       &lt;br&gt;      &lt;br&gt;&lt;font face="Courier New"&gt;AllowTypeIn &lt;/font&gt;      &lt;br&gt;This property restricts the user from manually typing into the people picker and forces them to use the Browse dialog to select users. See final note.       &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Next we need to add the JavaScript to our page.      &lt;br&gt;      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;At the very top of your page after all the Page and Register tags you will notice the opening &amp;lt;asp:content&amp;gt; tag for &lt;font face="Courier New"&gt;PlaceHolderMain&lt;/font&gt;. We need to place the following code above this control on the page:       &lt;br&gt;      &lt;br&gt;&lt;font face="Courier New"&gt;&amp;lt;asp:Content        &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; id="Content1"         &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; runat="server"         &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; contentplaceholderid="PlaceHolderAdditionalPageHead"&amp;gt;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type="text/javascript"&amp;gt; &lt;/font&gt;      &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function SetPeopleValues()&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;//Retrieve the semi-colon separated            &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //list of user id's&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var people = document.getElementById('ctl00_PlaceHolderMain_pplPicker_downlevelTextBox').value;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById('ctl00_PlaceHolderMain_InitiationForm_ff1_1').value = people;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (people=='')&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert('No people selected');           &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#008000"&gt;//Split the list by ; to get an            &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //array of domain user names&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var arrPeople = new Array();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrPeople = people.split(';');           &lt;br&gt;          &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#008000"&gt;//Create an empty string to hold the            &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //email addresses&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var strEmails = '';           &lt;br&gt;          &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;//Loop through the array of usernames&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var arrEndIndex = arrPeople.length - 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var i=0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (i &amp;lt;= arrEndIndex)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#008000"&gt;//Strip the domain name off and append            &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //the email address elements&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var person = String(arrPeople[i]);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; person = person.toLowerCase().replace('DOMAIN\\','');&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var email = person + '@domain.com';           &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Add this email address to our string&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strEmails = strEmails + email;           &lt;br&gt;          &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font color="#008000"&gt;//If this is the final email then add this            &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //value to the text box in our initiation             &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //form control, otherwise add the             &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //semi-colon&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (i == arrEndIndex)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById('ctl00_PlaceHolderMain_InitiationForm_ff1_1').value = strEmails;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strEmails = strEmails + '; ';&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }           &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=i+1;           &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/font&gt;&lt;/p&gt;      &lt;p&gt;&lt;font face="Courier New"&gt;&amp;nbsp; &amp;lt;/script&amp;gt;          &lt;br&gt;&amp;lt;/asp:Content&amp;gt;           &lt;br&gt;          &lt;br&gt;&lt;/font&gt;&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;This uses the &lt;font face="Courier New"&gt;PlaceHolderAdditionalPageHead&lt;/font&gt; place holder to 'inject' some JavaScript into the head of the html page.       &lt;br&gt;      &lt;br&gt;Essentially this code is retrieving the value from our people picker and inserting it into the text box held on the &lt;font face="Courier New"&gt;DataFormWebPart&lt;/font&gt;. In my case I am doing some additional processing (to generate a semi-colon separated list of email addresses).       &lt;br&gt;      &lt;br&gt;      &lt;table align="center" cellpadding="2" cellspacing="0"&gt;         &lt;tr&gt;           &lt;td&gt;&lt;b&gt;NOTE:&lt;/b&gt; By default the PeoplePicker control (that is the TextArea html control that is rendered by the PeopleEditor SharePoint control) contains a semi-colon separated list of user names, of the form DOMAIN\UserName, so if you wanted to ignore the string parsing and processing elements of the javascript you could just set this value to the textbox straight away and then do any text processing on these values within your workflow (see below). &lt;/td&gt;         &lt;/tr&gt;       &lt;/table&gt;      &lt;p&gt;&lt;font face="Courier New"&gt;function SetPeopleValues()          &lt;br&gt;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;//Retrieve the semi-colon separated list of user id's&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var people = document.getElementById('ctl00_PlaceHolderMain_pplPicker_downlevelTextBox').value;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById('ctl00_PlaceHolderMain_InitiationForm_ff1_1').value = people;           &lt;br&gt;}           &lt;br&gt;&lt;/font&gt;&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;To tidy up the look and feel of your form select the &amp;lt;tr&amp;gt;      &lt;br&gt;tag that contains the textbox control from within your &lt;font face="Courier New"&gt;DataFormWebPart &lt;/font&gt;and set the style tag to:       &lt;br&gt;      &lt;br&gt;&lt;font face="Courier New"&gt;style="visibility: hidden"&lt;/font&gt;       &lt;br&gt;      &lt;br&gt;This will mean that the end user does not see the data being passed to this textbox they just select their users and click Start.       &lt;br&gt;      &lt;br&gt;If you save all the changes you have made to this form then try and initiate your workflow you will see that you should be able to select your users using the Browse button and then click start, an email containing the details set out in your workflow should be emailed to the users selected in your People Picker.       &lt;br&gt;      &lt;br&gt;&lt;strong&gt;And that's it!&lt;/strong&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;table align="center" cellpadding="2" cellspacing="0"&gt;     &lt;tr&gt;       &lt;td&gt;         &lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; If you don't declare the &lt;font face="Courier New"&gt;PeopleEditor&lt;/font&gt; control with &lt;font face="Courier New"&gt;AllowTypeIn&lt;/font&gt; set to false then your end users could manually type in any name regardless of whether or not it exists or can be resolved. In this scenario clicking start will not cause the people picker to resolve the names first and the value of your textbox will be empty as our JavaScript will not run. If anyone has any ideas on this could they please post comments as I would like to get this working.&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=75810" width="1" height="1"&gt;</description><category domain="http://www.simple-talk.com/community/blogs/charleslee/archive/category/1024.aspx">SharePoint Designer</category></item><item><title>Programmatically uploading an image to a SharePoint Picture Library</title><link>http://www.simple-talk.com/community/blogs/charleslee/archive/2009/10/21/75594.aspx</link><pubDate>Wed, 21 Oct 2009 12:54:32 GMT</pubDate><guid isPermaLink="false">f46e5dea-70cd-4a69-a7e1-fd07a313bd4d:75594</guid><dc:creator>CharlesLee</dc:creator><slash:comments>11</slash:comments><comments>http://www.simple-talk.com/community/blogs/charleslee/comments/75594.aspx</comments><wfw:commentRss>http://www.simple-talk.com/community/blogs/charleslee/commentrss.aspx?PostID=75594</wfw:commentRss><description>&lt;p&gt;SharePoint's ability to store and maintain libraries of resources (such as images, documents and other files) is a very useful weapon in a SharePoint developer's arsenal. In this article I will show how you can leverage the power of a Picture Library to store uploaded content for use across your Site Collection.&lt;/p&gt;  &lt;p&gt;It's fairly simple to navigate to the user interface for a picture library and upload a new file. It is almost as simple as clicking 'Upload Picture' from the Upload menu. However you will additionally be encouraged to add meta-data to your picture in order to better catalogue it.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/ProgrammaticallyuploadinganimagetoaShare_8177/image.png"&gt;&lt;img title="Uploading a picture" border="0" alt="Uploading a picture" src="http://www.simple-talk.com/blogbits/CharlesLee/ProgrammaticallyuploadinganimagetoaShare_8177/image_thumb.png" width="443" height="142" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;However when you are writing a custom SharePoint solution like a web part or an application page you may not want the user to have to navigate away from your solution in order to upload the image into the requisite picture library. Luckily the SharePoint object model combined with some fairly simple ASP.Net code can simplify this task for you.&lt;/p&gt;  &lt;p&gt;The basic concept is simple you take a standard ASP.Net &lt;font face="Courier New"&gt;FileUpload &lt;/font&gt;control and add this in to your solution. This control provides the basic user interface needed to upload a file and it has some very useful methods for working with the file once it has been uploaded.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/ProgrammaticallyuploadinganimagetoaShare_8177/image_3.png"&gt;&lt;img title="The FileUpload control" border="0" alt="The FileUpload control" src="http://www.simple-talk.com/blogbits/CharlesLee/ProgrammaticallyuploadinganimagetoaShare_8177/image_thumb_3.png" width="245" height="50" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;In addition to this control you will need some ASP.Net code in order to retrieve the contents of this file and some simple Windows SharePoint Services (WSS) 3.0 code to place this picture in the requisite picture library.&lt;/p&gt;  &lt;p&gt;You will need to access a Stream of the data from the file uploaded in the &lt;font face="Courier New"&gt;FileUpload&lt;/font&gt; control. This can then be used to create a new document in the Picture Library. The &lt;font face="Courier New"&gt;FileUpload&lt;/font&gt; control has a handy property called &lt;font face="Courier New"&gt;PostedFile&lt;/font&gt; which will provide access to the file which is being uploaded and in turn this has a property called &lt;font face="Courier New"&gt;InputStream&lt;/font&gt; which contains the Stream of data from the file. Some simple code to achieve this would be:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;Dim streamImage As Stream = Nothing        &lt;br /&gt;If fleInput.HasFile Then         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; streamImage = fleInput.PostedFile.InputStream         &lt;br /&gt;End If&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;The &lt;font face="Courier New"&gt;HasFile&lt;/font&gt; property of the &lt;font face="Courier New"&gt;FileUpload&lt;/font&gt; control is fairly self explanatory as it merely indicates if a file has been selected in the control.&lt;/p&gt;  &lt;p&gt;The &lt;font face="Courier New"&gt;SPPictureLibrary&lt;/font&gt; class in WSS 3.0 is dedicated to managing the resources held within a picture library; essentially this is identical to the &lt;font face="Courier New"&gt;SPDocumentLibrary&lt;/font&gt; class with the addition of 3 properties (&lt;font face="Courier New"&gt;ThumbnailSize&lt;/font&gt;, &lt;font face="Courier New"&gt;WebImageHeight&lt;/font&gt; and &lt;font face="Courier New"&gt;WebImageWidth&lt;/font&gt;) which control how the images display within this picture library. Although this class exists there is no need to use it unless you are interested in dealing with one of those 3 properties. In fact your code only requires the &lt;font face="Courier New"&gt;RootFolder&lt;/font&gt; property on the &lt;font face="Courier New"&gt;SPList&lt;/font&gt; class.&lt;/p&gt;  &lt;p&gt;The &lt;font face="Courier New"&gt;RootFolder&lt;/font&gt; property is an instance of the &lt;font face="Courier New"&gt;SPFolder&lt;/font&gt; class and this provides access to the &lt;font face="Courier New"&gt;SPFileCollection&lt;/font&gt; which represents the files in this library. So uploading a new file is a case of adding a new &lt;font face="Courier New"&gt;SPFile&lt;/font&gt; instance into this collection. The code for this would be as shown below: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;Using Site As New SPSite(&amp;quot;SITECOLLECTIONURL&amp;quot;)        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Using Web As SPWeb = Site.OpenWeb(&amp;quot;SITEURL&amp;quot;)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim pics As SPList = Web.Lists(&amp;quot;PICTURELIBRARYNAME&amp;quot;)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; pics.RootFolder.Files.Add( _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;font face="Courier New"&gt;fleInput.FileName, streamImage)        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End Using         &lt;br /&gt;End Using&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Essentially you are adding the Stream as a new file to your picture library. In actual fact because this code is operating at such a low level you can use it to upload any file into a document library within SharePoint. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.simple-talk.com/blogbits/CharlesLee/ProgrammaticallyuploadinganimagetoaShare_8177/image_4.png"&gt;&lt;img title="Image uploaded" border="0" alt="Image uploaded" src="http://www.simple-talk.com/blogbits/CharlesLee/ProgrammaticallyuploadinganimagetoaShare_8177/image_thumb_4.png" width="286" height="315" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;This article has shown how you can use a simple &lt;font face="Courier New"&gt;FileUpload&lt;/font&gt; control and the power of WSS 3.0 to simplify the uploading of files into Picture Libraries and other SharePoint document libraries.&lt;/p&gt;&lt;img src="http://www.simple-talk.com/community/aggbug.aspx?PostID=75594" width="1" height="1"&gt;</description></item></channel></rss>
