<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CleverWorkarounds &#187; Web Services</title>
	<atom:link href="http://www.cleverworkarounds.com/category/sharepoint/application-development/web-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cleverworkarounds.com</link>
	<description>After much frustration, it seems DEFAULT is the way to go...</description>
	<lastBuildDate>Mon, 07 Jun 2010 10:20:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Missing metadata with Office 2003 &#8211; yet another &#8220;duh&#8221; moment&#8230;</title>
		<link>http://www.cleverworkarounds.com/2009/09/05/missing-metadata-with-office-2003-yet-another-duh-moment/</link>
		<comments>http://www.cleverworkarounds.com/2009/09/05/missing-metadata-with-office-2003-yet-another-duh-moment/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 03:15:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.cleverworkarounds.com/2009/09/05/missing-metadata-with-office-2003-yet-another-duh-moment/</guid>
		<description><![CDATA[I had a problem this week that got resolved with something quite obvious, but I learned a lot in the process, so I am detailing it here. Symptoms: Using MOSS 2007 SP2 and Office 2003 SP3, users complained that metadata on documents went missing. Consider the scenario below where we have a sample document library. [...]<p class="tags">No Tags</p>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-6551570212921028";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel = "";
google_ui_features = "rc:6";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<p>I had a problem this week that got resolved with something quite obvious, but I learned a lot in the process, so I am detailing it here.</p>
<p>Symptoms: Using MOSS 2007 SP2 and Office 2003 SP3, users complained that metadata on documents went missing. Consider the scenario below where we have a sample document library.</p>
<p><a href="http://www.cleverworkarounds.com/wp-content/uploads/2009/09/image1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.cleverworkarounds.com/wp-content/uploads/2009/09/image_thumb1.png" width="797" height="128" /></a> </p>
<p>Our user opens the “Memo to Council re Convenor” document into Word 2003, makes a change and saves it. Note the difference. Where’s my metadata?</p>
<p><a href="http://www.cleverworkarounds.com/wp-content/uploads/2009/09/image2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.cleverworkarounds.com/wp-content/uploads/2009/09/image_thumb2.png" width="797" height="128" /></a> </p>
<p>I asked about this on the <a href="http://www.codify.com/lists/OzMOSS" target="_blank">ozmoss</a> mailing list, and others noted the same issue. Some had applied the June 2009 cumulative update for WSS3 and the problem was solved for them. I applied this update, and it improved the situation, but did not cure the problem totally.</p>
<p>Upon further investigation, we were able to ascertain that the problem would only happen on certain PCs. The same user could update the same document on a different PC and it would work fine. A fiddler trace of the process allowed me to narrow down the issue and understand the sequence of events. The root cause of the issue was incorrect handling of HTML/JavaScript by Office 2003 and/or Internet Explorer. This manifests itself in an inconsistency in the display of properties in the Office “Web File Properties” dialog box (file-&gt;properties in an office 2003 app). Consider the example below.</p>
<p><a href="http://www.cleverworkarounds.com/wp-content/uploads/2009/09/clip_image0021.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://www.cleverworkarounds.com/wp-content/uploads/2009/09/clip_image002_thumb1.jpg" width="419" height="368" /></a>&#160; <a href="http://www.cleverworkarounds.com/wp-content/uploads/2009/09/clip_image00251.jpg"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image002[5]" border="0" alt="clip_image002[5]" src="http://www.cleverworkarounds.com/wp-content/uploads/2009/09/clip_image0025_thumb1.jpg" width="459" height="368" /></a></p>
<p>Note that the first dialog shows that values for the metadata columns are blank or default. Now consider the same document opened on a different PC. Well what do you know – we have metadata!</p>
<p>Fiddler confirmed that when <strong>saving</strong> a document to SharePoint from an Office 2003 application, the <strong>same </strong>HTTP request is made to SharePoint as is done when displaying the document properties in the above example. </p>
<p>In both cases, A HTTP GET request is made to the owssvr.dll&#160; (WSS RPC)&#160; and the <a href="http://msdn.microsoft.com/en-us/library/ms414166.aspx" target="_blank">dialogview</a> method is called. Therefore, the root of my problem has something to do with the fact that the data returned by this call was not being parsed properly by MSWord on one PC (as illustrated by the first of the above dialog box screenshots). When a user than saved their edits, blank or default values are being written back to SharePoint, in effect “losing” the metadata.</p>
<p>So let’s take a look at the HTTP call and the data returned. The call to owssvr.dll&#160; looks like this.</p>
<p><strong>GET /somesite/_vti_bin/owssvr.dll?location=My%20Committee/Agenda%20attachment%20July%2009.doc&amp;dialogview=SaveForm HTTP/1.1</strong></p>
<p>The output returned by SharePoint is a bunch of HTML and JavaScript that MSWord then renders by calling the Internet Explorers rendering framework programmatically. (I’ve included sample output at the end of the post for the hardcore nerds).</p>
<p>So the question now becomes, what was preventing the correct HTML rendering on one PC and not the other? This was a difficult question to answer because I was unable to find a way to debug JavaScript when the output was rendered in Office 2003 apps.</p>
<p>When you think about it, there can be many potential causes here. Given that Internet Explorer is effectively doing the work (WinINet), this whole process could be adversely affected by add-ins, zone settings, AD policies, virus scanning, etc. On one affected PC I disabled all all-ins to Internet Explorer and retried without success. After around half an hour of frustration, I decided to reset IE’s configuration as shown below.</p>
<p><a href="http://www.cleverworkarounds.com/wp-content/uploads/2009/09/image3.png"><img style="border-right-width: 0px; margin: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.cleverworkarounds.com/wp-content/uploads/2009/09/image_thumb3.png" width="292" height="372" /></a> </p>
<p>After accepting the various warnings, I retried the test and it all worked! Metadata was now being properly saved. “Awesome”, I thought. I’m not quite sure what the true root cause is, but at least I know how to cure it.</p>
<p>Then it suddenly dawned on me that I’d been stupid. For all of my low level examination of the office 2003/RPC interaction with SharePoint, picking the brain of gurus like MCM <a href="http://harbar.net/" target="_blank">Spence Harbar</a>, I’d never thought to clear the temporary internet files cache. Doh!</p>
<p>On the next affected PC I did so, and the problem also went away instantly.</p>
<p>*Blush*</p>
<p>In my defence of my dumbness however, I had never examined the behind the scenes integration with Office 2003 and SharePoint, and it did not even twig that Internet Explorer would be involved in the picture. Given that this problem manifests itself within Office 2003 applications, it is not immediately obvious that your temporary internet files would cause an issue here – but now I know better <img src='http://www.cleverworkarounds.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
<h2>And now I get it…</h2>
<p>Now Office 2007 is not affected by this because it does not use this method at all. In 2007, the document information panel uses InfoPath to render metadata. At the time I naively thought that was a dumb idea because the document information panel cannot display custom column types. For example, let’s say you created a custom column type to hold a phone number with the correct formatting for country code and the like. In a SharePoint site you can display it fine, but in the Office 2007 document information panel, you will never see it. InfoPath only will work with the out of the box in column types.</p>
<p>My rationale was that if Office 2007 instead used JavaScript and HTML, then it should be able to display these sorts of custom columns. That may actually be true, but it is irrelevant. When you think of the sheer number of ways that the rendering of the code could be interfered with (Temporary Internet Files being one precedent), you can see why the Office team might have opted for the safety of InfoPath instead. </p>
<p>Now that I understand that this is how Office 2003 does it, I can plainly see that it leaves too much room for error.</p>
<p>So even though my problem was solved by a simple clearing of the cache, it still remains that things like a bad add-in or a bad AD policy setting could interfere with the Office 2003/SharePoint integration. So if you ever have this issue crop up, try the temporary internet files thing or reset IE’s configuration completely. It may save you a lot of time and pain troubleshooting.</p>
<p>Thanks for reading</p>
<p>Paul Culmsee</p>
<p><a href="http://www.sevensigma.com.au">www.sevensigma.com.au</a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">html</span> <span class="attr">dir</span><span class="kwrd">=&quot;ltr&quot;</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">HEAD</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">    <span class="kwrd">&lt;</span><span class="html">META</span> <span class="attr">Name</span><span class="kwrd">=&quot;GENERATOR&quot;</span> <span class="attr">Content</span><span class="kwrd">=&quot;Microsoft SharePoint&quot;</span><span class="kwrd">&gt;</span></pre>
<pre>    <span class="kwrd">&lt;</span><span class="html">META</span> <span class="attr">HTTP-EQUIV</span><span class="kwrd">=&quot;Content-Type&quot;</span> <span class="attr">CONTENT</span><span class="kwrd">=&quot;text/html; charset=utf-8&quot;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">    <span class="kwrd">&lt;</span><span class="html">META</span> <span class="attr">HTTP-EQUIV</span><span class="kwrd">=&quot;Expires&quot;</span> <span class="attr">content</span><span class="kwrd">=&quot;0&quot;</span><span class="kwrd">&gt;</span></pre>
<pre>    <span class="rem">&lt;!-- _locID=&quot;id_PageTitle&quot; _locComment=&quot;{StringCategory=TTL}&quot; --&gt;</span></pre>
<pre class="alt">    <span class="kwrd">&lt;</span><span class="html">Title</span> <span class="attr">ID</span>=<span class="attr">onetidTitle</span><span class="kwrd">&gt;</span>File Properties<span class="kwrd">&lt;/</span><span class="html">Title</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;</span><span class="html">Link</span> <span class="attr">REL</span><span class="kwrd">=&quot;stylesheet&quot;</span> <span class="attr">Type</span><span class="kwrd">=&quot;text/css&quot;</span> <span class="attr">HREF</span><span class="kwrd">=&quot;/_layouts/1033/styles/core.css&quot;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">    <span class="kwrd">&lt;</span><span class="html">META</span> <span class="attr">Name</span><span class="kwrd">=&quot;Microsoft Theme&quot;</span> <span class="attr">Content</span><span class="kwrd">=&quot;default&quot;</span><span class="kwrd">&gt;</span></pre>
<pre>    <span class="kwrd">&lt;</span><span class="html">META</span> <span class="attr">Name</span><span class="kwrd">=&quot;Microsoft Border&quot;</span> <span class="attr">Content</span><span class="kwrd">=&quot;none&quot;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">script</span> <span class="attr">src</span><span class="kwrd">=&quot;/_layouts/1033/init.js&quot;</span><span class="kwrd">&gt;&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span></pre>
<pre>&lt;script src=<span class="str">&quot;/_layouts/1033/core.js&quot;</span>&gt;&lt;/script&gt;</pre>
<pre class="alt">&#160;</pre>
<pre>&lt;script src=<span class="str">&quot;/_layouts/1033/bform.js&quot;</span>&gt;&lt;/script&gt;</pre>
<pre class="alt">&#160;</pre>
<pre>&lt;/HEAD&gt;</pre>
<pre class="alt">&lt;Script ID=<span class="str">&quot;Form_Validate&quot;</span>&gt;</pre>
<pre><span class="kwrd">function</span> Form_Validate(fVisible)</pre>
<pre class="alt">{</pre>
<pre>    <span class="kwrd">if</span> (frm.FValidate(fVisible))</pre>
<pre class="alt">        document.OWSForm.IsFormValid.value=<span class="str">&quot;true&quot;</span>;</pre>
<pre>    <span class="kwrd">else</span></pre>
<pre class="alt">        document.OWSForm.IsFormValid.value=<span class="str">&quot;false&quot;</span>;</pre>
<pre>}</pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">Script</span><span class="kwrd">&gt;</span></pre>
<pre>&lt;Script ID=<span class="str">&quot;Update_UI_From_Values&quot;</span>&gt;</pre>
<pre class="alt"><span class="kwrd">var</span> bFormFieldsInited = <span class="kwrd">false</span>;</pre>
<pre><span class="kwrd">function</span> Update_UI_From_Values()</pre>
<pre class="alt">{</pre>
<pre>    frm.SetFirstFocus(bFormFieldsInited);</pre>
<pre class="alt">    bFormFieldsInited = <span class="kwrd">true</span>;</pre>
<pre>    frm.DataBind();</pre>
<pre class="alt">    DefaultControls();</pre>
<pre>}</pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">Script</span><span class="kwrd">&gt;</span></pre>
<pre>&lt;Script ID=<span class="str">&quot;Update_Values_From_UI&quot;</span>&gt;</pre>
<pre class="alt"><span class="kwrd">function</span> Update_Values_From_UI()</pre>
<pre>{</pre>
<pre class="alt">    frm.SetFirstFocus(bFormFieldsInited);</pre>
<pre>    bFormFieldsInited = <span class="kwrd">true</span>;</pre>
<pre class="alt">    frm.FValidate(<span class="kwrd">false</span>);</pre>
<pre>}</pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">Script</span><span class="kwrd">&gt;</span></pre>
<pre>&lt;script language=<span class="str">&quot;JavaScript&quot;</span>&gt;</pre>
<pre class="alt">L_tooltipfile_Text = <span class="str">&quot;&quot;</span>;</pre>
<pre>L_tooltipfolder_Text = <span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">selectedElement = <span class="kwrd">null</span></pre>
<pre>inChangeSelection = <span class="kwrd">false</span></pre>
<pre class="alt">slElem = <span class="kwrd">null</span>;</pre>
<pre>oldSelection = <span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">bIsFileDialogView = <span class="kwrd">true</span>;</pre>
<pre><span class="kwrd">function</span> selectrow()</pre>
<pre class="alt">{</pre>
<pre>    <span class="kwrd">if</span> (slElem) {</pre>
<pre class="alt">        slElem.className=oldSelection;</pre>
<pre>        slElem.title=<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">        }</pre>
<pre>    selectedElement = window.<span class="kwrd">event</span>.srcElement;</pre>
<pre class="alt">    <span class="kwrd">while</span> (selectedElement.tagName!=<span class="str">&quot;TR&quot;</span>) {</pre>
<pre>           selectedElement=selectedElement.parentElement;</pre>
<pre class="alt">           }</pre>
<pre>    slElem = selectedElement;</pre>
<pre class="alt">    oldSelection=slElem.className;        </pre>
<pre>    slElem.className=<span class="str">&quot;ms-selected&quot;</span>;</pre>
<pre class="alt">    <span class="kwrd">if</span> (slElem.getAttribute(<span class="str">&quot;fileattribute&quot;</span>) == <span class="str">&quot;file&quot;</span>)</pre>
<pre>        slElem.title=L_tooltipfile_Text;</pre>
<pre class="alt">    <span class="kwrd">else</span></pre>
<pre>        slElem.title=L_tooltipfolder_Text;</pre>
<pre class="alt">    document.selection.empty();</pre>
<pre>}</pre>
<pre class="alt"><span class="kwrd">function</span> checkScroll()</pre>
<pre>{</pre>
<pre class="alt">    <span class="kwrd">if</span> (document.body.scrollHeight &gt; document.body.offsetHeight ||</pre>
<pre>        document.body.scrollWidth &gt; document.body.offsetWidth)</pre>
<pre class="alt">       document.body.scroll=<span class="str">&quot;yes&quot;</span>;</pre>
<pre>}</pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span></pre>
<pre>&lt;BODY marginwidth=0 marginheight=0 onload=<span class="str">&quot;checkScroll()&quot;</span> onresize=<span class="str">&quot;checkScroll()&quot;</span> scroll=no&gt;</pre>
<pre class="alt">&lt;!-- Banner --&gt;</pre>
<pre>&lt;TABLE  CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=<span class="str">&quot;100%&quot;</span> &gt;</pre>
<pre class="alt">  &lt;TR&gt;</pre>
<pre>   &lt;TD COLSPAN=3 STYLE=<span class="str">&quot;width:100%&quot;</span>&gt;</pre>
<pre class="alt">    &lt;TABLE <span class="kwrd">class</span>=ms-bannerframe CELLPADDING=0 CELLSPACING=0 BORDER=0 STYLE=<span class="str">&quot;width:100%&quot;</span>&gt;</pre>
<pre>     &lt;TR&gt;</pre>
<pre class="alt">      &lt;TD VALIGN=BOTTOM WITDH=25&gt;</pre>
<pre>      &lt;font size=1&gt;&amp;nbsp;&lt;/font&gt;</pre>
<pre class="alt">      &lt;/TD&gt;</pre>
<pre>     &lt;/TR&gt;</pre>
<pre class="alt">    &lt;/TABLE&gt;</pre>
<pre>   &lt;/TD&gt;</pre>
<pre class="alt">  &lt;/TR&gt;</pre>
<pre>&lt;/table&gt;</pre>
<pre class="alt">&lt;table width=100% cellpadding=4 cellspacing=0&gt;</pre>
<pre> &lt;tr&gt;</pre>
<pre class="alt">  &lt;td&gt;</pre>
<pre>   &lt;TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0 WIDTH=<span class="str">&quot;100%&quot;</span> &gt;</pre>
<pre class="alt">    &lt;tr&gt;</pre>
<pre>     &lt;td&gt;</pre>
<pre class="alt">      &lt;table cellpadding=0 cellspacing=0 style=<span class="str">&quot;margin-left: 3px;margin-bottom:2px&quot;</span>&gt;</pre>
<pre>       &lt;tr&gt;</pre>
<pre class="alt">        &lt;td nowrap <span class="kwrd">class</span>=<span class="str">&quot;ms-titlearea&quot;</span>&gt;Some User&lt;/td&gt;</pre>
<pre>       &lt;/tr&gt;</pre>
<pre class="alt">       &lt;tr&gt;</pre>
<pre>        &lt;td ID=onetidPageTitle nowrap <span class="kwrd">class</span>=<span class="str">&quot;ms-pagetitle&quot;</span>&gt;My Committee&lt;/td&gt;</pre>
<pre class="alt">       &lt;/tr&gt;</pre>
<pre>      &lt;/table&gt;</pre>
<pre class="alt">     &lt;/td&gt;</pre>
<pre>    &lt;/tr&gt;</pre>
<pre class="alt">    &lt;tr&gt;</pre>
<pre>     &lt;td&gt;</pre>
<pre class="alt">      &lt;table border=0 width=100% cellpadding=0 cellspacing=0 style=<span class="str">&quot;margin-left: 3px;margin-bottom: 3px&quot;</span>&gt;</pre>
<pre>       &lt;tr&gt;</pre>
<pre class="alt">        &lt;td <span class="kwrd">class</span>=<span class="str">&quot;ms-sectionline&quot;</span> height=1&gt;&lt;img src=<span class="str">&quot;/_layouts/images/blank.gif&quot;</span>&gt;&lt;/td&gt;</pre>
<pre>       &lt;/tr&gt;</pre>
<pre class="alt">      &lt;/table&gt;</pre>
<pre>     &lt;/td&gt;</pre>
<pre class="alt">    &lt;/tr&gt;</pre>
<pre>        &lt;!-- Item Form --&gt;</pre>
<pre class="alt">        </pre>
<pre>&lt;SCRIPT&gt;</pre>
<pre class="alt"><span class="kwrd">var</span> frm = <span class="kwrd">new</span> OWSForm(<span class="str">&quot;OWSForm&quot;</span>, <span class="kwrd">false</span>, <span class="str">&quot;http:\u002f\u002fintranetdev\u002fsomesite\u002f_layouts\u002f&quot;</span>);</pre>
<pre><span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">&#160;</pre>
<pre>&lt;SCRIPT&gt; frm.dopt.chDateSep = <span class="str">&quot;\u002f&quot;</span>; frm.dopt.chTimeSep = <span class="str">&quot;:&quot;</span>; frm.dopt.SetTimeFormat(0); frm.dopt.SetDateOrder(1); frm.dopt.SetDOW(0); frm.dopt.stAM = <span class="str">&quot;AM&quot;</span>; frm.dopt.stPM = <span class="str">&quot;PM&quot;</span>; frm.dopt.TimeMarkPosn = 0; frm.dopt.webTZOffsetMin = -480;  frm.nopt.chDigSep = <span class="str">&quot;,&quot;</span>; frm.nopt.chDecimal = <span class="str">&quot;.&quot;</span>; frm.nopt.chMinus = <span class="str">&quot;-&quot;</span>; frm.nopt.iNegNumber = 1; frm.nopt.SetGrouping(<span class="str">&quot;3;0&quot;</span>); </pre>
<pre class="alt">frm.stFieldPrefix = <span class="str">&quot;urn:schemas-microsoft-com:office:office#&quot;</span>;</pre>
<pre>frm.stImagesPath = <span class="str">&quot;\u002f_layouts\u002fimages\u002f&quot;</span>;</pre>
<pre class="alt">frm.wBaseType = 1;</pre>
<pre><span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;&lt;</span><span class="html">Form</span> <span class="attr">Name</span><span class="kwrd">=&quot;OWSForm&quot;</span> <span class="attr">id</span>=<span class="attr">OWSForm</span> <span class="attr">EncType</span><span class="kwrd">=&quot;multipart/form-data&quot;</span> <span class="attr">Action</span><span class="kwrd">=&quot;http://intranetdev/somesite/_vti_bin/owssvr.dll?CS=65001&quot;</span> <span class="attr">Method</span>=<span class="attr">POST</span> <span class="attr">onSubmit</span><span class="kwrd">=&quot;return false;&quot;</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">&lt;INPUT Type=Hidden Name=<span class="str">&quot;_charset_&quot;</span> Value=<span class="str">&quot;utf-8&quot;</span>&gt;</pre>
<pre>&lt;INPUT ID=onetidCmd Type=Hidden Name=<span class="str">&quot;Cmd&quot;</span> Value=<span class="str">&quot;Save&quot;</span>&gt;</pre>
<pre class="alt">&lt;INPUT ID=onetidIsFormValid type=hidden name=<span class="str">&quot;IsFormValid&quot;</span>&gt;</pre>
<pre>&lt;INPUT ID=onetidFormWasPosted type=hidden name=<span class="str">&quot;FormWasPosted&quot;</span>&gt;</pre>
<pre class="alt">&lt;INPUT ID=<span class="str">&quot;MustUpdateForm&quot;</span> type=hidden name=<span class="str">&quot;MustUpdateForm&quot;</span> value=<span class="str">&quot;true&quot;</span>&gt;</pre>
<pre>&lt;INPUT type=hidden name=<span class="str">&quot;NextID&quot;</span> id=<span class="str">&quot;NextID&quot;</span> value=<span class="str">&quot;-1&quot;</span>&gt;</pre>
<pre class="alt">&lt;INPUT type=hidden name=<span class="str">&quot;NextUsing&quot;</span> id=<span class="str">&quot;NextUsing&quot;</span> value=<span class="str">&quot;&quot;</span>&gt;</pre>
<pre>&lt;SPAN id=<span class="str">'part1'</span>&gt;&lt;INPUT ID=onetidIOHidden TYPE=HIDDEN NAME=<span class="str">&quot;List&quot;</span> VALUE=<span class="str">&quot;{EF494645-1D24-4761-A874-0CB866FA494C}&quot;</span>&gt;</pre>
<pre class="alt">&lt;INPUT ID=onetidIOHidden TYPE=HIDDEN NAME=<span class="str">&quot;ID&quot;</span> VALUE=<span class="str">&quot;New&quot;</span>&gt;</pre>
<pre>&lt;TABLE border=0 cellpadding=2&gt;</pre>
<pre class="alt">&lt;SCRIPT&gt;<span class="kwrd">var</span> _g_tp_fNewForm = <span class="kwrd">true</span>;<span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;</span></pre>
<pre>&lt;TR style=<span class="str">&quot;display:none&quot;</span>&gt;&lt;TH nowrap valign=top <span class="kwrd">class</span>=<span class="str">&quot;ms-formlabel&quot;</span>&gt;&lt;nobr&gt;Comment&lt;font color=red&gt;&lt;/font&gt;&lt;/nobr&gt;&lt;/TH&gt;&lt;TD <span class="kwrd">class</span>=<span class="str">&quot;ms-formbody&quot;</span>&gt;&lt;SCRIPT&gt;fld = <span class="kwrd">new</span> NoteField(frm,<span class="str">&quot;Comment1&quot;</span>,<span class="str">&quot;Comment&quot;</span>,<span class="str">&quot;&quot;</span>);fld.stNumLines = <span class="str">&quot;20&quot;</span>;fld.IMEMode=<span class="str">&quot;&quot;</span>;fld.BuildUI();<span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;</span>&amp;nbsp;&lt;br&gt;&lt;SPAN <span class="kwrd">class</span>=<span class="str">&quot;ms-formdescription&quot;</span>&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style=<span class="str">&quot;display:none&quot;</span>&gt;&lt;TH nowrap valign=top <span class="kwrd">class</span>=<span class="str">&quot;ms-formlabel&quot;</span>&gt;&lt;nobr&gt;Document&amp;nbsp;Status&lt;font color=red&gt;&lt;/font&gt;&lt;/nobr&gt;&lt;/TH&gt;&lt;TD <span class="kwrd">class</span>=<span class="str">&quot;ms-formbody&quot;</span>&gt;&lt;SCRIPT&gt;fld = <span class="kwrd">new</span> ChoiceField(frm,<span class="str">&quot;Corro_x0020_Status&quot;</span>,<span class="str">&quot;Document Status&quot;</span>,<span class="str">&quot;Not Started&quot;</span>); fld.format = <span class="str">&quot;Dropdown&quot;</span>; fld.AddChoice(<span class="str">&quot;Not Started&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;No Action Required&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;In Progress&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Completed&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Deferred&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Waiting on someone else&quot;</span>, <span class="str">&quot;&quot;</span>);fld.IMEMode=<span class="str">&quot;&quot;</span>;fld.BuildUI();<span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;&lt;</span><span class="html">SPAN</span> <span class="attr">class</span><span class="kwrd">=&quot;ms-formdescription&quot;</span><span class="kwrd">&gt;&lt;/</span><span class="html">SPAN</span><span class="kwrd">&gt;&lt;/</span><span class="html">TD</span><span class="kwrd">&gt;&lt;/</span><span class="html">TR</span><span class="kwrd">&gt;&lt;</span><span class="html">TR</span> <span class="attr">style</span><span class="kwrd">=&quot;display:none&quot;</span><span class="kwrd">&gt;&lt;</span><span class="html">TH</span> <span class="attr">nowrap</span> <span class="attr">valign</span>=<span class="attr">top</span> <span class="attr">class</span><span class="kwrd">=&quot;ms-formlabel&quot;</span><span class="kwrd">&gt;&lt;</span><span class="html">nobr</span><span class="kwrd">&gt;</span>Content&amp;nbsp;Type&lt;font color=red&gt;&lt;/font&gt;&lt;/nobr&gt;&lt;/TH&gt;&lt;TD <span class="kwrd">class</span>=<span class="str">&quot;ms-formbody&quot;</span>&gt;&lt;SCRIPT&gt;fld = <span class="kwrd">new</span> ChoiceField(frm,<span class="str">&quot;ContentType&quot;</span>,<span class="str">&quot;Content Type&quot;</span>,<span class="str">&quot;LSWA Document&quot;</span>); fld.format = <span class="str">&quot;Dropdown&quot;</span>; fld.AddChoice(<span class="str">&quot;LSWA Document&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Folder&quot;</span>, <span class="str">&quot;&quot;</span>);fld.IMEMode=<span class="str">&quot;&quot;</span>;fld.BuildUI();<span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;&lt;</span><span class="html">SPAN</span> <span class="attr">class</span><span class="kwrd">=&quot;ms-formdescription&quot;</span><span class="kwrd">&gt;&lt;/</span><span class="html">SPAN</span><span class="kwrd">&gt;&lt;/</span><span class="html">TD</span><span class="kwrd">&gt;&lt;/</span><span class="html">TR</span><span class="kwrd">&gt;&lt;</span><span class="html">TR</span> <span class="attr">style</span><span class="kwrd">=&quot;display:none&quot;</span><span class="kwrd">&gt;&lt;</span><span class="html">TH</span> <span class="attr">nowrap</span> <span class="attr">valign</span>=<span class="attr">top</span> <span class="attr">class</span><span class="kwrd">=&quot;ms-formlabel&quot;</span><span class="kwrd">&gt;&lt;</span><span class="html">nobr</span><span class="kwrd">&gt;</span>Committee&amp;nbsp;Document&lt;font color=red&gt;&lt;/font&gt;&lt;/nobr&gt;&lt;/TH&gt;&lt;TD <span class="kwrd">class</span>=<span class="str">&quot;ms-formbody&quot;</span>&gt;&lt;SCRIPT&gt;fld = <span class="kwrd">new</span> ChoiceField(frm,<span class="str">&quot;Committee_x0020_Document&quot;</span>,<span class="str">&quot;Committee Document&quot;</span>,<span class="str">&quot;&quot;</span>); fld.format = <span class="str">&quot;Dropdown&quot;</span>; fld.AddChoice(<span class="str">&quot;Agendas&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Minutes&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Actions&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Administration&quot;</span>, <span class="str">&quot;&quot;</span>);fld.IMEMode=<span class="str">&quot;&quot;</span>;fld.BuildUI();<span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;&lt;</span><span class="html">SPAN</span> <span class="attr">class</span><span class="kwrd">=&quot;ms-formdescription&quot;</span><span class="kwrd">&gt;&lt;/</span><span class="html">SPAN</span><span class="kwrd">&gt;&lt;/</span><span class="html">TD</span><span class="kwrd">&gt;&lt;/</span><span class="html">TR</span><span class="kwrd">&gt;&lt;</span><span class="html">TR</span> <span class="attr">style</span><span class="kwrd">=&quot;display:none&quot;</span><span class="kwrd">&gt;&lt;</span><span class="html">TH</span> <span class="attr">nowrap</span> <span class="attr">valign</span>=<span class="attr">top</span> <span class="attr">class</span><span class="kwrd">=&quot;ms-formlabel&quot;</span><span class="kwrd">&gt;&lt;</span><span class="html">nobr</span><span class="kwrd">&gt;</span>Document&amp;nbsp;Type&lt;font color=red&gt;&lt;/font&gt;&lt;/nobr&gt;&lt;/TH&gt;&lt;TD <span class="kwrd">class</span>=<span class="str">&quot;ms-formbody&quot;</span>&gt;&lt;SCRIPT&gt;fld = <span class="kwrd">new</span> ChoiceField(frm,<span class="str">&quot;Document_x0020_Types&quot;</span>,<span class="str">&quot;Document Type&quot;</span>,<span class="str">&quot;&quot;</span>); fld.format = <span class="str">&quot;Dropdown&quot;</span>; fld.AddChoice(<span class="str">&quot;Incoming Correspondence&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Outgoing Correspondence&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Internal Document&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Fax&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;E-mail&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;Memo&quot;</span>, <span class="str">&quot;&quot;</span>);fld.IMEMode=<span class="str">&quot;&quot;</span>;fld.BuildUI();<span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;&lt;</span><span class="html">SPAN</span> <span class="attr">class</span><span class="kwrd">=&quot;ms-formdescription&quot;</span><span class="kwrd">&gt;&lt;/</span><span class="html">SPAN</span><span class="kwrd">&gt;&lt;/</span><span class="html">TD</span><span class="kwrd">&gt;&lt;/</span><span class="html">TR</span><span class="kwrd">&gt;&lt;</span><span class="html">TR</span> <span class="attr">style</span><span class="kwrd">=&quot;display:none&quot;</span><span class="kwrd">&gt;&lt;</span><span class="html">TH</span> <span class="attr">nowrap</span> <span class="attr">valign</span>=<span class="attr">top</span> <span class="attr">class</span><span class="kwrd">=&quot;ms-formlabel&quot;</span><span class="kwrd">&gt;&lt;</span><span class="html">nobr</span><span class="kwrd">&gt;</span>Year&lt;font color=red&gt;&lt;/font&gt;&lt;/nobr&gt;&lt;/TH&gt;&lt;TD <span class="kwrd">class</span>=<span class="str">&quot;ms-formbody&quot;</span>&gt;&lt;SCRIPT&gt;fld = <span class="kwrd">new</span> ChoiceField(frm,<span class="str">&quot;Year&quot;</span>,<span class="str">&quot;Year&quot;</span>,<span class="str">&quot;&quot;</span>); fld.format = <span class="str">&quot;Dropdown&quot;</span>; fld.AddChoice(<span class="str">&quot;2000&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;2001&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;2002&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;2003&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;2004&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;2005&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;2006&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;2007&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;2008&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;2009&quot;</span>, <span class="str">&quot;&quot;</span>);fld.AddChoice(<span class="str">&quot;2010&quot;</span>, <span class="str">&quot;&quot;</span>);fld.IMEMode=<span class="str">&quot;&quot;</span>;fld.BuildUI();<span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;&lt;</span><span class="html">SPAN</span> <span class="attr">class</span><span class="kwrd">=&quot;ms-formdescription&quot;</span><span class="kwrd">&gt;&lt;/</span><span class="html">SPAN</span><span class="kwrd">&gt;&lt;/</span><span class="html">TD</span><span class="kwrd">&gt;&lt;/</span><span class="html">TR</span><span class="kwrd">&gt;&lt;/</span><span class="html">TABLE</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">&lt;script type=<span class="str">&quot;text/javascript&quot;</span>&gt;</pre>
<pre>_g_tp_rgctNames = <span class="kwrd">new</span> Array;</pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;&lt;</span><span class="html">SCRIPT</span><span class="kwrd">&gt;</span><span class="kwrd">var</span> _tp_rgctfld = <span class="kwrd">null</span>;<span class="kwrd">var</span> _tp_ctfld = <span class="kwrd">null</span>;<span class="kwrd">var</span> _g_tp_rgcts = <span class="kwrd">new</span> Array;<span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;</span></pre>
<pre>&lt;script type=<span class="str">&quot;text/javascript&quot;</span>&gt;</pre>
<pre class="alt">_g_tp_rgctNames.push(<span class="str">&quot;LSWA Document&quot;</span>);</pre>
<pre><span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">&#160;</pre>
<pre>            &lt;SCRIPT&gt;</pre>
<pre class="alt">            _tp_rgctfld = <span class="kwrd">new</span> Array;</pre>
<pre>            </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;ContentType&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;SelectFilename&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;FileLeafRef&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;TRUE&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;Created&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;TRUE&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;Title&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;FALSE&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;FALSE&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;TRUE&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;Modified&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;TRUE&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;Modified_x0020_By&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;FALSE&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;Created_x0020_By&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;FALSE&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;Comment1&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;Corro_x0020_Status&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;Committee_x0020_Document&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;FALSE&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;Document_x0020_Types&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;FALSE&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;Year&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;FALSE&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">                _tp_ctfld = <span class="kwrd">new</span> Object(<span class="kwrd">null</span>);</pre>
<pre>                _tp_ctfld.stName=<span class="str">&quot;MoveDocu&quot;</span>;</pre>
<pre class="alt">                _tp_ctfld.fRequired = BoolFromString(<span class="str">&quot;FALSE&quot;</span>);</pre>
<pre>                _tp_ctfld.fHidden = BoolFromString(<span class="str">&quot;&quot;</span>);</pre>
<pre class="alt">                _tp_ctfld.fShowInNewForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre>                _tp_ctfld.fShowInEditForm = BoolFromString2(<span class="str">&quot;&quot;</span>, <span class="kwrd">true</span>);</pre>
<pre class="alt">                _tp_ctfld.fReadOnly = BoolFromString(<span class="str">&quot;TRUE&quot;</span>);</pre>
<pre>                _tp_ctfld.stDisplay =<span class="str">&quot;Move Document&quot;</span>;</pre>
<pre class="alt">                    _tp_rgctfld.push(_tp_ctfld);</pre>
<pre>                </pre>
<pre class="alt">            _g_tp_rgcts.push(_tp_rgctfld);</pre>
<pre>            <span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">            </pre>
<pre>&lt;script type=<span class="str">&quot;text/javascript&quot;</span>&gt;</pre>
<pre class="alt">_g_tp_rgctNames.push(<span class="str">&quot;Folder&quot;</span>);</pre>
<pre><span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span></pre>
<pre class="alt">&#160;</pre>
<pre>            &lt;SCRIPT&gt;</pre>
<pre class="alt">            _tp_rgctfld = <span class="kwrd">new</span> Array;</pre>
<pre>            _g_tp_rgcts.push(_tp_rgctfld);</pre>
<pre class="alt">            <span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;</span></pre>
<pre>            </pre>
<pre class="alt">&lt;script type=<span class="str">&quot;text/javascript&quot;</span>&gt;</pre>
<pre><span class="kwrd">function</span> _FixMpCt2Flds()</pre>
<pre class="alt">{</pre>
<pre>    <span class="kwrd">var</span> frm = frmCurrent;</pre>
<pre class="alt">    <span class="kwrd">var</span> rgn1 = frm.rgctNames;</pre>
<pre>    <span class="kwrd">var</span> rgn2 = _g_tp_rgctNames;</pre>
<pre class="alt">    <span class="kwrd">var</span> rgctflds = _g_tp_rgcts;</pre>
<pre>    <span class="kwrd">if</span> (rgctflds.length &lt; rgn1.length)</pre>
<pre class="alt">    {</pre>
<pre>        <span class="kwrd">var</span> rgnew = <span class="kwrd">new</span> Array;</pre>
<pre class="alt">        <span class="kwrd">var</span> i;</pre>
<pre>        <span class="kwrd">var</span> j = 0;</pre>
<pre class="alt">        <span class="kwrd">for</span> (i = 0; i &lt; rgn1.length; i++)</pre>
<pre>        {</pre>
<pre class="alt">            <span class="kwrd">var</span> n1 = rgn1[i];</pre>
<pre>            <span class="kwrd">var</span> n2 = rgn2[j];</pre>
<pre class="alt">            <span class="kwrd">if</span> (n1 != n2)</pre>
<pre>            {</pre>
<pre class="alt">                rgnew.push(<span class="kwrd">new</span> Array);</pre>
<pre>            }</pre>
<pre class="alt">            <span class="kwrd">else</span></pre>
<pre>            {</pre>
<pre class="alt">                rgnew.push(rgctflds[j]);</pre>
<pre>                j++;</pre>
<pre class="alt">            }</pre>
<pre>        }</pre>
<pre class="alt">        _g_tp_rgcts = rgnew;</pre>
<pre>    }</pre>
<pre class="alt">}</pre>
<pre>_FixMpCt2Flds();</pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">script</span><span class="kwrd">&gt;</span></pre>
<pre>&#160;</pre>
<pre class="alt">&lt;/SPAN&gt;&lt;/form&gt;</pre>
<pre>&lt;SCRIPT&gt;</pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">SCRIPT</span><span class="kwrd">&gt;</span></pre>
<pre>&#160;</pre>
<pre class="alt">        <span class="rem">&lt;!-- FooterBanner closes the TD, TR, TABLE, BODY, And HTML regions opened above --&gt;</span></pre>
<pre><span class="attr">&amp;nbsp;</span></pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">td</span><span class="kwrd">&gt;&lt;/</span><span class="html">tr</span><span class="kwrd">&gt;&lt;/</span><span class="html">table</span><span class="kwrd">&gt;&lt;/</span><span class="html">PlaceHolder</span><span class="kwrd">&gt;&lt;/</span><span class="html">TD</span><span class="kwrd">&gt;&lt;/</span><span class="html">TR</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;/</span><span class="html">TABLE</span><span class="kwrd">&gt;</span></pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">BODY</span><span class="kwrd">&gt;</span></pre>
<pre><span class="kwrd">&lt;/</span><span class="html">HTML</span><span class="kwrd">&gt;</span></pre>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p class="tags">No Tags</p>]]></content:encoded>
			<wfw:commentRss>http://www.cleverworkarounds.com/2009/09/05/missing-metadata-with-office-2003-yet-another-duh-moment/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>New book preview &#8211; SharePoint 2007 Developers Guide to the Business Data Catalog</title>
		<link>http://www.cleverworkarounds.com/2009/06/04/new-book-preview-sharepoint-2007-developers-guide-to-the-business-data-catalog/</link>
		<comments>http://www.cleverworkarounds.com/2009/06/04/new-book-preview-sharepoint-2007-developers-guide-to-the-business-data-catalog/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 13:29:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Application Development]]></category>
		<category><![CDATA[BDC]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[SDK]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Web Parts]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.cleverworkarounds.com/?p=1336</guid>
		<description><![CDATA[I’ve been busy on a number of fronts and some of the fruits of that work will appear soon enough, but I thought that I would pop up to let you know about a forthcoming book written by Brett Lonsdale and Nick Swan on a SharePoint component that has until now, been seriously under-represented in [...]<p class="tags">No Tags</p>]]></description>
			<content:encoded><![CDATA[<p><!--adsense-->
<p>I’ve been busy on a number of fronts and some of the fruits of that work will appear soon enough, but I thought that I would pop up to let you know about a forthcoming book written by <a href="http://www.brettlonsdale.com/spblog/default.aspx" target="_blank">Brett Lonsdale</a> and <a href="http://www.sharepointnick.com/" target="_blank">Nick Swan</a> on a SharePoint component that has until now, been seriously under-represented in the plethora of SharePoint books out there in the marketplace.</p>
<p><iframe style="width: 120px; height: 240px" marginheight="0" src="http://rcm.amazon.com/e/cm?t=cleverwo-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=1933988819&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" frameborder="0" marginwidth="0" scrolling="no"></iframe></p>
<p>The Business Data Catalog is one of those SharePoint components that is easy enough to understand conceptually, but then will scare the utter crap out of you when you delve into the guts of its XML based complexity.&#160; At least that was my experience the first time I toyed with it in early 2007. Luckily for me, my ass was saved by a tool that had just been released as a public beta called <a href="http://www.bdcmetaman.com/" target="_blank">BDC MetaMan</a>. I downloaded this tool and within around 15 minutes I used it to set up a BDC connection to Microsoft’s Systems Management Server v4 to pull software package details into a SharePoint list and felt very proud of myself indeed.&#160; </p>
<p>Fast forward to mid 2009 and BDC MetaMan has come a hell of a long way, as have its creators. Nick and Brett are about as world-authoritative as you can possibly get on the BDC and if you wish to become a Jedi in the dark arts of the BDC “force” then you now have your official bible. This book is absolutely crammed with detail and the expertise of the authors in this feature shines throughout.</p>
<p>The book is split up across 11 chapters and although it is not explicitly stated by the authors, seems to be made of 3 broad parts. Chapter 1 introduces the BDC, how it is architected (web parts, BDC column, BDC Search, and integration with User Profile import and the SDK). Also covered is the range of data sources, an introduction to Application Definition Files (ADF) and how it all integrates into the Shared Service Provider model.</p>
<p>Once the intro chapter is done with, Brett and Nick don’t waste too much time in diving deep.&#160; </p>
<p>Chapters 2 and 3 deal with the structure of BDC Application Definition (ADF) files, and follows up with the complex world of how authentication plays out with the BDC. Chapter 2 delves far more into the ADF files than I ever wished to tread, but Nick and Brett somehow manage to describe a long, boring XML file in a logical, easy to follow manner and there was a lot of stuff that I learned here that I had simply missed from trawling MSDN articles. The authentication chapter is covered in excellent detail in Chapter 3 and goes way beyond the usual NTLM/Kerberos double-hop stuff. Authentication in the Microsoft world has become very complex these days, and there are various options and trade-offs. This chapter covers all of this and more, brilliant stuff.</p>
<p>After the deep dive of ADF and authentication, we surface a little from the previous two chapters into what I think really, is part 2 of this book. That is, several chapters that deal with how you leverage the BDC once you have connected to a line of business application. Chapter 4 introduces the built-in web parts that come with the BDC, shows how they are used and how they can be modified either using SharePoint Designer or tweaking XSL styles directly. Chapter 5 explores the BDC column type, how it can be used in the Office document information panel, in SharePoint Designer workflows, as well as its limitations. Chapter 6 explains how to leverage the BDC for allowing SharePoint to crawl your back-end line of business data and present it in search results. In addition to this, chapter 6 has a lot to offer just from the point of view of customising the search experience, whether using BDC or not. Finally, Chapter 7 examines how the BDC can be utilised to add data into user profiles that is leveraged via audience targeting.</p>
<p>Next we dive back into “real programmer” territory and what I think makes part 3 of this book. Chapter 8 delves deep into the BDC object model, for those times when the out of the box stuff just won’t quite cut it for you. The example used to demonstrate this object model is a web service that exposes BDC data via several methods. Chapter 9 then covers the creation of a custom web part that is in effect, an Ajax version of the out of the box “Business Data List web part” that refreshes data every few seconds without requiring a page load. Chapter 10 is particularly interesting because it examines how the BDC is used in conjunction with another oft overlooked suite of technologies known as “Office Business Applications”. The combination of BDC and OBA offer many interesting capabilities and among the examples, there are examples of Excel and Word leveraging the BDC as well as creating custom task panes, custom ribbons and the like. Finally, chapter 11 deals with using the BDC to write data back to the line of business applications and finishes with a great example of using InfoPath to submit data to a line of business application via a webservice that calls the BDC. That is hellishly cool in a nerdy developer kind of a way. </p>
<p>Phew! First up, *man* these guys are smart! I have to say this is the hardest SharePoint book that I have reviewed. It is obviously aimed at developers but it has so much to offer beyond the BDC. The content is very technical at times and obviously low-level. That, itself, is not the problem. Conversely, complex topics are handled really well and everything is extremely logically organised and flows well. The book is simply very, very comprehensive! There is plenty of meat for developers to sink their teeth into and this book will keep you going for a long time.</p>
<p>The preface of the book states that it has been written for an audience of “Microsoft SharePoint 2007 Information Workers and Developers who need to learn how to use, customize and create solutions using the Business Data Catalog”. I would agree with this, but I hope that information workers do not get put off by chapter 2 (and to some extent, chapter 3). This book dives deep straight off the bat and it is actually the middle chapters that offer the sort of insights that information workers will find the most useful.</p>
<p>So, if you think that the BDC deserves more than one single chapter towards the back of a SharePoint book, then this is your answer. As well as becoming an expert on the BDC, It will open your eyes to many possibilities beyond it.</p>
<p>Thanks for reading</p>
<p>Paul Culmsee</p>
<p> <!--adsense--></p>
<p class="tags">No Tags</p>]]></content:encoded>
			<wfw:commentRss>http://www.cleverworkarounds.com/2009/06/04/new-book-preview-sharepoint-2007-developers-guide-to-the-business-data-catalog/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SharePoint for Cisco Fanboys (and more developers) &#8211; Part 4</title>
		<link>http://www.cleverworkarounds.com/2008/01/26/sharepoint-for-cisco-fanboys-and-more-developers-part-4/</link>
		<comments>http://www.cleverworkarounds.com/2008/01/26/sharepoint-for-cisco-fanboys-and-more-developers-part-4/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 11:38:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Application Development]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[SDK]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.cleverworkarounds.com/2008/01/26/sharepoint-for-cisco-fanboys-and-more-developers-part-4/</guid>
		<description><![CDATA[Welcome to part 4 of my series on demonstrating SharePoint&#8217;s usefulness for storing Cisco configuration backups. What a hard slog it&#8217;s been! The last article (part 3) of this series focused on how to modify an open source C# TFTP server to upload files into a SharePoint document library using the SharePoint SDK. Here is [...]<p class="tags">No Tags</p>]]></description>
			<content:encoded><![CDATA[<p><!--Adsense--></p>
<p>Welcome to part 4 of my series on demonstrating SharePoint&#8217;s usefulness for storing Cisco configuration backups. What a hard slog it&#8217;s been! The last article (<a href="http://www.cleverworkarounds.com/2008/01/26/sharepoint-for-cisco-fanboys-and-developers-part-3/">part 3</a>) of this series focused on how to modify an open source C# TFTP server to upload files into a SharePoint document library using the SharePoint SDK.</p>
<p>Here is the quick recap on what we have covered so far</p>
<ul>
<li><a href="http://www.cleverworkarounds.com/2008/01/21/sharepoint-for-cisco-fanboys-part-1/">Part 1</a> illustrated how it it possible to use SNMP to tell a Cisco IOS device to dump its configuration to TFTP. We talked about the version control feature of SharePoint and why it makes sense to TFTP your configs to a SharePoint document library. We covered the WEBDAV network provider supplied with XP and Win2003 and finished off with a basic example using the TFTP server TFTPD32.  </li>
<li><a href="http://www.cleverworkarounds.com/2008/01/24/sharepoint-for-cisco-fanboys-darn-webdav-part-2/">Part 2</a> went into more detail about the issues you can face when using the WEBDAV network provider. It also went into more detail on 3 TFTP server products (<a href="http://www.tftp-server.com/">WinAgents TFTP</a>, <a href="http://www.solarwinds.com/products/freetools/free_tftp_server.aspx">SolarWinds TFTP Server</a> and <a href="http://tftpd32.jounin.net/">TFTPD32</a> and why TFTPD32 ended up being the best choice for this purpose.  </li>
<li><a href="http://www.cleverworkarounds.com/2008/01/26/sharepoint-for-cisco-fanboys-and-developers-part-3/">Part 3</a> then looked at a wonderful open source TFTP server written in C# called <a href="http://sourceforge.net/projects/tftputil">TFTPUtil</a>. We modified the source code of this TFTP server to use the SharePoint SDK and upload files to a SharePoint document library. </li>
</ul>
<p>Now both the WEBDAV and SDK methods had some issues. The WEBDAV method was obviously easy to set up because pretty much any application (theoretically anyway) can be made to work with it. I, however, had reliability issues with this method as <a href="http://www.cleverworkarounds.com/2008/01/24/sharepoint-for-cisco-fanboys-darn-webdav-part-2/">part 2</a> detailed. The SDK method was much more reliable, but had its own problems. Many people would be uncomfortable with having to perform custom modification of an existing open source TFTP server, but more importantly, there are security implications with this method too.</p>
<p>So we have one remaining method that we can explore. This method is still based around modifications to the TFTPUtil source code but instead of using the SharePoint SDK, we instead use the SharePoint web services.</p>
<p><span id="more-416"></span></p>
<h2>SharePoint 2007 Web Services</h2>
<p>SharePoint can be remotely interacted with via Web Services. Out of the box, a number of web services are provided and shown below (along with the URL of the service based around my sample SharePoint server used in this series).</p>
<ul>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774865.aspx">Administration Web Service</a> (http://tidemo/_vti_adm/Admin.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774411.aspx">Alerts Web Service</a> (http://tidemo/_vti_bin/Alerts.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/aa979750.aspx">Authentication Web Service</a> (http://tidemo/_vti_bin/Authentication.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774619.aspx">Copy Web Service</a> (http://tidemo/_vti_bin/Copy.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774834.aspx">Document Workspace Web Service</a> (http://tidemo/_vti_bin/Dws.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms772564.aspx">Forms Web Service</a> (http://tidemo/_vti_bin/Forms.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774467.aspx">Imaging Web Service</a> (http://tidemo/_vti_bin/Imaging.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774413.aspx">List Data Retrieval Web Service</a> (http://tidemo/_vti_bin/DspSts.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774654.aspx">Lists Web Service</a> (http://tidemo/_vti_bin/Lists.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774629.aspx">Meetings Web Service</a> (http://tidemo/_vti_bin/Meetings.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms772618.aspx">People Web Service</a> (http://tidemo/_vti_bin/People.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms773592.aspx">Permissions Web Service</a> (http://tidemo/_vti_bin/Permissions.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms457703.aspx">SharePoint Directory Management Web Service</a> (  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774821.aspx">Site Data Web Service</a> (http://tidemo/_vti_bin/SiteData.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774847.aspx">Sites Web Service</a> (http://tidemo/_vti_bin/Sites.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774707.aspx">Search Web Service</a> (http://tidemo/_vti_bin/spsearch.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms772647.aspx">Users and Groups Web Service</a> (http://tidemo/_vti_bin/usergroup.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms772545.aspx">Versions Web Service</a> (http://tidemo/_vti_bin/Versions.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774725.aspx">Views Web Service</a> (http://tidemo/_vti_bin/Views.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms774569.aspx">Web Part Pages Web Service</a> (http://tidemo/_vti_bin/WebPartPages.asmx)  </li>
<li><a href="http://msdn2.microsoft.com/en-us/library/ms772553.aspx">Webs Web Service</a> (<a href="http://tidemo/_vti_bin/Webs.asmx">http://tidemo/_vti_bin/Webs.asmx</a>) </li>
</ul>
<p>So let&#8217;s go back to our TFTPutil project in Visual Studio and use Web Services instead of the SDK</p>
<h2>Modification Example #2 Web Services</h2>
<p>Initially I thought that I was going to have to write my own web service to upload a file to SharePoint, but like TFTPUtil, it didn&#8217;t take much googling to find that the hard work had already been done.</p>
<p>In this case, it was the excellent <a href="http://geek.hubkey.com/2007/10/upload-file-to-sharepoint-document.html">work</a> by <a href="http://www.blogger.com/profile/07046898420109468604">txs8311</a>. He had written some articles on how to upload into SharePoint via methods provided by the out of the box web services. We will incorporate his work into TFTPUtil and see how it goes!</p>
<p>Out of respect for txs8311, I will not re-paste his code here, but I will show how I have incorporated it into TFTPUtil.</p>
<p>If you check his <a href="http://geek.hubkey.com/2007/10/upload-file-to-sharepoint-document.html">blog post</a>, he has created a class called DocLibHelper. We will add this as a class to TFTPUtil and then call it from the TFTPServerProcess class that we modified in my <a href="http://www.cleverworkarounds.com/2008/01/26/sharepoint-for-cisco-fanboys-and-developers-part-3/">last post</a>.</p>
<p>So let&#8217;s go back to our TFTPUtil project in Visual Studio and add a new item to the project. Add a class and call it DocLibHelper.</p>
<p><a href="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image40.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="66" alt="image" src="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image-thumb40.png" width="347" border="0"/></a></p>
<p><a href="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image41.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="392" alt="image" src="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image-thumb41.png" width="644" border="0"/></a> \</p>
<p>Once added, paste the content of the DocLibHelper class from txs8311&#8242;s site. Do not forget to add the references to the libraries used by the code.</p>
<pre class="csharpcode"><span class="kwrd">using</span> System;
<span class="kwrd">using</span> System.Collections;
<span class="kwrd">using</span> System.Collections.Generic;
<span class="kwrd">using</span> System.Text;
<span class="kwrd">using</span> System.Net;
<span class="kwrd">using</span> System.IO;
<span class="kwrd">using</span> System.Xml;</pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p>Finally, the code interacts with the Lists web service (lists.asmx) and we need to add a reference to a SharePoint web service so we can compile and test the code against the lists web service. From the &#8220;Project&#8221; menu, choose &#8220;Add Web Reference&#8221;. In the URL, connect to the lists service for your SharePoint server (in my case <a href="http://tidemo/_vti_bin/Lists.asmx">http://tidemo/_vti_bin/Lists.asmx</a>)</p>
<p><a href="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image42.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="454" alt="image" src="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image-thumb42.png" width="644" border="0"/></a></p>
<p>You MUST name this Web Reference <strong>ListsService </strong>as txs8311&#8242;s code expects it to be this name.</p>
<p><a href="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image43.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="349" alt="image" src="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image-thumb43.png" width="644" border="0"/></a></p>
<p>That&#8217;s it for the webservice code! Now let&#8217;s modify the TFTPServerProcess class to use it! (I go into detail on modifying this class in the <a href="http://www.cleverworkarounds.com/2008/01/26/sharepoint-for-cisco-fanboys-and-developers-part-3/">previous post</a>).</p>
<pre class="csharpcode">State.Close();
<span class="kwrd">if</span> (IsSharePoint){
    <span class="rem">// Now we add this newly downloaded file to the document library</span>
    <span class="kwrd">try</span>
    {
        DocLibHelper docLibHelper = <span class="kwrd">new</span> DocLibHelper();
        Dictionary&lt;<span class="kwrd">string</span>, <span class="kwrd">object</span>&gt; properties = <span class="kwrd">new</span> Dictionary&lt;<span class="kwrd">string</span>, <span class="kwrd">object</span>&gt;();
        properties.Add(<span class="str">"Title"</span>, State.Filename);
        <span class="kwrd">string</span> uploadURL = TempPath + <span class="str">@"/"</span> + State.Filename;
        <span class="rem">//Create or overwrite text file test.txt in 'Docs' document library creating folder 'Test Folder' as required.</span>
        docLibHelper.Upload(uploadURL, System.Text.Encoding.ASCII.GetBytes(FullPath + <span class="str">@"/"</span> + State.Filename), properties);

        <span class="rem">// clean up temp file</span>
        File.Delete(FullPath + <span class="str">@"/"</span> + State.Filename);
    }
    <span class="kwrd">catch</span> (Exception ex)
    {
        AddMsg(Level.Verbose, <span class="str">"Problem opening SharePoint site"</span> + TempPath);
        AddMsg(Level.Debug, <span class="str">"Exception: "</span> + ex.Message + <span class="str">"\n"</span> + ex.StackTrace);
    }
}
<span class="rem">// This is the last block so go ahead and setup to delete stateStopListener(); </span>
StopListener(); </pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p>So let&#8217;s have a closer look at this code. Now we are invoking an object based on txs8311&#8242;s the DocLibHelper class, rather than the SharePoint SDK classes. After creating an instance of DocLibHelper, we create a <a href="http://msdn2.microsoft.com/en-us/library/xfhwa508.aspx">dictionary</a> object to hold the properties of the file. We will write the name of the file to the &#8220;Title&#8221; column (the result of which you will see later).
</p>
<p>We then call the Upload method, passing in the URL, a reference to the file to be uploaded and the properties dictionary.</p>
<h2>One little gotcha!</h2>
<p>One minor thing that I have to mention here, as I got caught by it. Web Services are case-sensitive! The invocation code on the console application was the following:</p>
<pre class="csharpcode">TFTPServer myTFTP = <span class="kwrd">new</span> TFTPServer();
myTFTP.AllowWRQ = <span class="kwrd">true</span>;
myTFTP.AllowWRQOverwrite = <span class="kwrd">true</span>;
myTFTP.Path = <span class="str">@"http://tidemo/tftp/backups"</span>;
myTFTP.StartListener(); </pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p>But in SharePoint the document library is actually called &#8220;Backups&#8221;. See the problem? I kept getting exception errors telling me &#8220;List not found&#8221;, and it took me a while to twig to the fact that I had to fix up line 4 of the above code.</p>
<pre class="csharpcode">myTFTP.Path = <span class="str">@"http://tidemo/tftp/Backups"</span>;</pre>
<style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p>Now that oughta do it! Let&#8217;s test!</p>
<p>Now we attempt an upload.</p>
<p><font face="courier">C:\&gt;TFTP 192.168.134.129 put c:\myfile.txt<br />Transfer successful: 43552 bytes in 1 second, 43552 bytes/s </font></p>
<p>Sweet!</p>
<p>Let&#8217;s check the document library. First up view properties so we can see the title field. Very good.</p>
<p><a href="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image44.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="179" alt="image" src="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image-thumb44.png" width="368" border="0"/></a></p>
<p>Okay now let&#8217;s do a few more TFTP PUT&#8217;s.</p>
<p><font face="courier">C:\&gt;TFTP 192.168.134.129 put c:\myfile.txt<br />Transfer successful: 43552 bytes in 1 second, 43552 bytes/s</font></p>
<p><font face="courier">[snip]</font></p>
<p><font face="courier">C:\&gt;TFTP 192.168.134.129 put c:\myfile.txt<br />Transfer successful: 43552 bytes in 1 second, 43552 bytes/s</font></p>
<p>So let&#8217;s look at the version history. What do you see now? SharePoint will report changes to properties (column values) in the version history. Version 285 of myfile.txt was the version where I updated the title property.</p>
<p><a href="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image45.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="285" alt="image" src="http://www.cleverworkarounds.com/wp-content/uploads/2008/01/image-thumb45.png" width="644" border="0"/></a></p>
<p>This method works nicely. The only problem I encountered was a delay after the first running of the program. To connect to the lists webservice, authenticate and call the necessary methods a little while on the first attempt. But subsequent attempts were fine. Since I did this on a VM on a heavily loaded laptop, it may not be noticeable in a prod environment at all.</p>
<h2>Modification Example #3, FrontPage Extensions and RPC</h2>
<p>txs8311 also wrote a <a href="http://geek.hubkey.com/2007/11/upload-file-to-sharepoint-document.html">second part</a> to his posts on uploading files into SharePoint. In this post he rewrote his DocLibHelper class to use FrontPage extensions and RPC. I did not try this, as I was satisfied with the modification Example #2. But all you should need to do, is replace the code in the DocLibHelper class with the code from his page.</p>
<p>If you are more keen than me, feel free to give it a shot and let me know how you go!</p>
<h2>Summary of Upload Methods</h2>
<p>So let&#8217;s recap on the three TFTP upload methods that we have used and summarise the advantages and disadvantages of each.</p>
<table cellspacing="0" cellpadding="2" width="728" border="1">
<tbody>
<tr>
<td valign="top" width="165"><strong>Method</strong></td>
<td valign="top" width="279"><strong>Advantages</strong></td>
<td valign="top" width="279"><strong>Disadvantages</strong></td>
</tr>
<tr>
<td valign="top" width="165">WEBDAV</td>
<td valign="top" width="279">Compatible (in theory) with most applications<br />Choice of TFTP Servers<br />TFTP Application does not need to run on the SharePoint server</td>
<td valign="top" width="278">Stability/Reliability issues<br />Cannot update metadata/document library columns</td>
</tr>
<tr>
<td valign="top" width="165">SharePoint SDK</td>
<td valign="top" width="279">No stability/reliability issues<br />Ability to update metadata/document library columns</td>
<td valign="top" width="278">Applications need to explicitly support this method<br />Custom TFTP Server needed to be modified<br />Application must run on a SharePoint farm server<br />Application requires administrative privileges on the server it runs from, has to be a farm administrator and requires read/write access to the Sharepoint SQL databases</td>
</tr>
<tr>
<td valign="top" width="165">SharePoint Web Services</td>
<td valign="top" width="279">No stability/reliability issues<br />Ability to update metadata/document library columns<br />TFTP Application does not need to run on the SharePoint server</td>
<td valign="top" width="278">Applications need to explicitly support this method<br />Custom TFTP Server needed to be modified</td>
</tr>
</tbody>
</table>
<p><strong>CleverWorkArounds Rating: Rock on SharePoint Web Services!</strong></p>
<h2></h2>
<h2>Additional Coolness</h2>
<p>Since we have modified this TFTP Server to our requirements, you are pretty much free to add SharePoint specific features to make integration even nicer. One feature that springs to mind is setting more metadata properties when the files are uploaded. Here is an example. Let&#8217;s assume that we have a list of Cisco IP addresses and the MODEL and TYPE of device on that address. E.g 6509 Switch, 3725 Router or Aironet 350 Wireless Access Point.</p>
<p>It would be pretty easy to modify our TFTP server to be able to <strong>examine </strong>this list when receiving a file and based on the IP of the sender of the file, write the <strong>type of device </strong>to a &#8220;Device Type&#8221; column in our configuration backups library.</p>
<p>Better still, it would then be very cool if that list of IP&#8217;s and device types <strong>already exist in SharePoint. </strong>Imagine this list exists in the form of an IP address register or better still, an IT device asset register (along with serial numbers, maintenance contract information and the like). It would be easy for staff to maintain this information and the list would have version control just like our &#8220;Backups&#8221; document library. But for me what would be really nice about this method is the organisational efficiency that would be gained.</p>
<p>That gain is this: The person that updates the asset register list isn&#8217;t necessarily the Cisco engineer that sets up the device. Critical device information is entered ONCE and leveraged from then on. The next post in this series will expand on these benefits.</p>
<h2>Conclusion</h2>
<p>Right! We are <strong>DONE </strong>with getting files into SharePoint and about damn time too!</p>
<p>The next posts in this series will move away from application development and infrastructure issues and move into some higher level governance issues. The aim here is to show Cisco and IT infrastructure people what you can do with SharePoint once you get the data into SharePoint. I hope if I do a decent job of writing it, that it will be easy to see just how this can be re-used for any IT infrastructure management.</p>
<p>But for now, I bid you adieu until then&#8230;.</p>
<p><!--Adsense--></p>
<p class="tags">No Tags</p>]]></content:encoded>
			<wfw:commentRss>http://www.cleverworkarounds.com/2008/01/26/sharepoint-for-cisco-fanboys-and-more-developers-part-4/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
