Archive for September, 2011

Approve or Reject multiple items in a SharePoint 2010 list

September 29, 2011 13 comments

I’ve updated this solution, an update to this post can be found here

The out of the box list approval feature of SharePoint is extremely useful, not just for documents but you can quickly create many business solutions using this functionality, especially where a workflow may well be overkill.

One drawback is that users have to review and approve/reject each item  individually and on a list with many items, this can be quick time consuming.  The way to implement this functionality would be a custom action on the ribbon and looking around the Internet, I found a great solution from Sohel Rana to do exactly this.

The only problem, was that this was not ready for prime time and as Sohel states, “The code is not just download-and-deploy mode. This is just a piece of how you can implement. You may need to fine tuning the code as per your needs. But I’ve tried to give the gist of how this can be done.” Therefore I decided to build on his ideas and create a new solution that is just download and deploy and has a more consistent SharePoint look and feel.

This is a farm solution, so it is deployed though Central Admin.  The feature is scoped at Web level so to enable this functionality active the feature in Site Features within Site Settings.

Once enabled you’ll find a new action on the ribbon bar which is active when multiple items are selected as shown below.

This will then create a dialog which uses the familiar SharePoint Approve/Reject item look and feel.

Clicking on OK will set all selected items to the approval status and the comment text is also applied to all items.  Any workflows that are in-flight on these items are cancelled.


Categories: SharePoint

SharePoint London Underground Tube Status Web Part

September 21, 2011 2 comments

This is a small web part I developed which displays the status of the tube lines which make up the Transport for London Underground network.   It could be a handy web part to fill in an area of a corporate Intranet, if of course the company happens to be based in London!

This consumes a TfL datafeed so your server will need Internet access and the solution needs to be deployed at the farm level.  I’m not going to post how you can deploy this web part but a generic farm solution deployment guide can be found here.  I’ve tested this on SharePoint 2010 only but should work fine on MOSS too.

The code doesn’t use Ajax and there is no automatic refresh.  More information about lines with problems will appears on a mouse over on the status.  I’ve not included the source but happy to post if it helps anybody, and I am considering writing a tube departure board web part showing the trains from a configurable station, so if this is of any interest then please leave a comment.

Download Tube Status Web Part

Categories: SharePoint, Web Part

Error an unhandled exception occurred in the Silverlight Application when creating SharePoint 2010 Sites

September 12, 2011 Leave a comment

When creating a new SharePoint 2010 site via the Silverlight interface, if you experience the Error, An unhandled exception occurred in the Silverlight Application there is a simple fix.

The problem is caused by the Silverlight application, attempting to communicate with the WCF endpoint using the Client Object Model when Security Validation is turned off for the web application.

To resolve, in Central Administration click on Manage Web Applications, highlight the problematic Web application and click General Settings from the ribbon.  Scroll down to Web Page Security Validation  and ensure Security Validation is On 

You will now be able to create sites using the Silverlight interface.

Categories: SharePoint, Silverlight
%d bloggers like this: