Monthly Archives: February 2012
How to view a version of an InfoPath form
Today I had a situation where I needed to see what a person originally submitted, i.e., the initial version of an InfoPath form with version history enabled. While you can revert to prior versions easily via the SharePoint UI, I haven’t figured out an out-of-the-box way to view a prior version of an InfoPath form. However, after tinkering with the URL gotten via the Modified column in the Version History dialog, I saw the part of the URL that gives me all the XML data. The URL part looks like this:
XmlLocation=http://server/site/subsite/_vti_history/<VersionNumber>/FormLibName/FileName.xml
If you copy and paste the URL, i.e., http://server/site/subsite/_vti_history/VersionNumber/FormLibName/FileName.xml, into a browser, you should be able to either render it as XML (if you have an extension or add-in that does that), or you can download it and open it in your preferred text editor. I’ve tried without success to open the prior version of the form in the browser. I keep getting an error, and other people seem to get errors too.
Setting task-item-level permissions in a SharePoint workflow
I didn’t realize this cool tip until yesterday when a colleague at my client informed me about the SpecialPermissions property of the CreateTask workflow activity. I had been taking a somewhat longer route of writing an ItemAdded event handler, which has its benefits because you can write other code besides handling permissions; however, this SpecialPermissions property is really handy. See this article for sample code to set up the property. You create an instance of a HybridDictionary and add key-value pairs of the login name and an SPRoleType member, respectively.