The extranet solution I have been working on over the past year has been selected as a finalist for ‘Best Intranet/Extranet Solution’ by the European SharePoint Community. The winner will be announced during the European SharePoint Conference in Copenhagen, Denmark at the start of February 2013.
Please check out the ‘GSM Association’ entry by clicking here and go ahead and vote for it if you like it.
I’m not sure how the other entries even quality for this category – they don’t look like internet or extranet solutions to me.
Congratulations to the whole team at Concentra for getting this far – and good luck to us!
A colleague of mine, Ari Bakker, recently posted about the new SharePoint 2013 certification road map. As it represents a significant change, especially for developers, it is definitely worth understanding if you plan on getting certified in the future. Check it out here.
I recently had a requirement around linking to and downloading specific versions of documents stored in SharePoint. There is some rather quirky behaviour around SPFileVersion and how this is achieved and I felt it warranted a post.
The first thing to be aware of is that there are two distinct version collections: SPFileVersionCollection and SPListItemVersionCollection. These collections can be accessed via the respective assets as you would expect (SPFile.Versions and SPListItem.Versions) and, as is the way in SharePoint, are enumerations of SPFileVersion and SPListItemVersion objects, respectively. These objects, which represent the individual versions, have a number of similar properties and methods but do not share a base class nor an interface.
In order to access specific versions of documents, the approach I took was to store the VersionLabel (a property on both SPFileVersion and SPListItemVersion) and then retrieve the version by using this value in conjunction with GetVersionFromLabel (a method on both SPFileVersion and SPListItemVersion). This works but with a number of caveats:
SPFileVersionCollection does NOT contain an entry for the latest version. This means that if the document has only a single version then this collection will be empty. If you want to access the latest version you must verify that the version label refers to the latest version by comparing it to the first entry in the SPListItemVersionCollection and if it is then access the SPFile directly. If you are accessing properties that are also present on an SPListItemVersion (ie not opening a stream) you can use that collection instead but you must also take note of the next point.
SPListItemVersion.Url behaves unexpectedly in some situations. Assumedly this is to support directing underprivileged users away from minor versions that they are not allowed to see (although I don’t see how it achieves this), the Url for minor versions will be equal to that of the latest minor version when there is no published version. Always use SPFileVersion.Url.
Minor versions get promoted when published, breaking links to the minor version. Example – You have a document currently at version 0.2, with a previous 0.1 version. When you publish this document you still only have two versions: 0.1 and 1.0. You will now fail to locate version 0.2. Don’t be fooled into thinking that using the VersionId property will solve this issue. It simply represents the the version label as an integer (+1 for each minor version, +512 for each major version). The only way I could find to handle this case is to introduce the doc store version which is stored in the property bag of the SPFile: SPFile.Properties["vti_docstoreversion"]. You can see how this works by looking at the code examples I have included but if this specific case isn’t going to be an issue for you then don’t use it and enjoy cleaner code (see here). Also note that the doc store version is only stored in the SPFile property bag and not in the SPListItem property bag.
I have included some code to illustrate how this may be implemented:
Please leave a comment and if you want to keep reading more about SharePoint don’t forget to subscribe.
The annual SharePoint Conference 2012 (SPC) is here and it’s in Las Vegas!
This time around it is particularly big news as SharePoint 2013 RTM was released at the end of last month, not to mention the recent Windows 8 release, the Surface and the acquisition of Yammer. I was lucky enough to be sent to the conference on behalf of Concentra to learn firsthand from those in know including MVPs and Microsoft themselves. It’s not only my first time at the conference but my first time at an event while it’s trending globally on Twitter.
Before coming to Las Vegas I had a few preconceived ideas about what to expect and what I considered to be the greatest improvements with the new version. The new App model was always going to be a highlight and naturally it was the focus of the keynote session. It’s powerful, it’s agile, it’s accessible and I’m really looking forward to getting deep into it. Jeff Teper and Scott Guthrie spent a good portion of the keynote session just on this very topic but equally represented was Yammer. For myself, I was surprised at the amount of attention the Yammer acquisition received. Both David Sacks and Adam Pisoni (Yammer Founder and Co-founder) took the stage and although I wasn’t blown away it looks like SharePoint has a strong future in regards to social especially seeing as most of Yammer now comes for free with SharePoint 2013. It was mentioned that the 3 year software development cycle has come to an end and a new 9 day cycle has begun – so hopefully we can expect more features more often going forward.
I spent the remainder of my day in sessions about the new App model. I plan on writing another blog in the near future that will get technical on the subject so for now I’ll pass over it but will say that it’s looking like a great model and along with the greatly improved RESTful services and Client Side Object Model (CSOM) is really quite exciting. The biggest surprise for me so far: Office Apps are very cool. It is now possible to do anything that can be done in SharePoint (think BI tools like geographically mapping table data or productivity tools that let you turn that table data into a SharePoint list or allows you to search for and reference specification documents) directly via Word, Excel, PowerPoint and Project with a single app (an App will work across the suite unmodified). And because Office Apps are built using the same web technologies as SharePoint Apps, you can make your SharePoint Apps available via Office applications with minimal effort and vice-versa.
There is a lot more to come with over 300 sessions being presented. There is at least three sessions I’d like to see for each and every time slot and it is tough work choosing the best track. I missed out on what I heard was a great session on search but thankfully there are plenty more. Search is destined to be another highlight of the conference as a lot of work has been done empowering both information users and developers to create more relevant solutions more easily. With well over 10,000 attendees here it is also a great opportunity to network – I was lucky enough to take a helicopter tour over the Grand Canyon with none other than MVP Chris O’Brien.
Look out for more blogs in the near future about all the new SharePoint goodness in greater detail.