Skip to main content

Posts

Showing posts from August, 2011

Understanding the Filters in SharePoint 2010 List Views

Lists are fundamental to SharePoint. Views are fundamental to lists. It’s therefore important to understand exactly what’s going on when you set up a new view in a SharePoint list. The number of items to display, which columns to show and even the sort order are easily understood – however I’ve seen people become unglued when it comes to setting up the filters on the list (including me!). The other day I had a particularly strained query I needed to configure so I set about understanding exactly what goes on when you set up filters in a view. For some reason it’s not something I’d ever really dug into before, so it was a eureka moment when I realised that I could look at the CAML of a view after I had created it. [Obviously I knew that each view had CAML underpinning it – and I knew it was possible to get the schema for a list, including the views, through the UI – so why didn’t I do this years ago!?] So let’s walk through an example. First I’ll knock up a task list wi...

FileNotFoundException was unhandled in Console Application

When I feel like to act together with SharePoint site to obtain data, quickly I will create a console application project to interact with SharePoint site instead of creating standard/visual webpart or custom solution I am fond of console applications since there is no need of packaging the custom solution, deploying, activating etc. Just write the code and hit F5, if it run…runs, if not throws the error right away . As I am comfortable with console applications in the same passion today I have created one console application project on SharePoint 2010 server and tried to list subsites from a site, the code be incredibly straightforward with not many lines, as soon as I hit F5 it thrown an error message saying that FileNotFoundException was unhandled The Web application at http://pravahaminfo:5 could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system administrator may need to add a new request URL mappi...

Cannot start service SPUserCodeV4 on computer

The service Microsoft SharePoint Foundation Sandboxed Code Service is stopped and when you are trying to deploy a webpart using Visual Studio 2010 we may face the error message saying that Cannot start service SPUserCodeV4 on computer <computer name> Error - Cannot start service SPUserCodeV4 on Computer To resolve this Go to Central Administration > System Settings On System Settings page, under Servers section click on Manage services on server Start Service - Microsoft SharePoint Foundation Sandboxed Code Service Next you will be able to notice the services in stopped/started status, look for the service Microsoft SharePoint Foundation Sandboxed Code Service and click Start, once you start then you will be able to deploy webpart or custom solutions created in Visual studio 2010

How to use Jquery in Sharepoint 2010

To use jQuery with SharePoint, there are two things that need to be done: The JavaScript library should first be deployed to a location which can be accessed by SharePoint pages, and the library should be loaded by the SharePoint pages. The recommended location for deployment of the JavaScript library is C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS folder . Doing so will allow the file to be loaded via the URL http://pravaham123/_layouts/jquery.js , because the _layouts part of the URL always points to the LAYOUTS folder. There are a couple of ways you can do this. 1) Using the Content Editor Web Part to load your jQuery Library The simplest way to load the library is by adding a Content Editor Web Part to the page and adding the following script to its Source Editor in the tool pane: < script type ="text/javascript" src ="http://pravaham123/_layouts/jquery-1.5.2.min.js" ></ script > ...