SharePoint 2010

SharePoint 2010
Creating a custom Refinement Filter Generator

A few months ago I added a post on configuring the Refinement web part that ships with SharePoint 2010. The post is mainly focussed on the Filter Category Definition property and the XML that you can add in there to configure the Refinement panel to do what you need. Since then the good folks as MS have added more in-depth documentation to MSDN covering this topic. In this post I want to move on from that and look at how you can develop your own custom filter generators and call them using the Filter Category Definition property. One situation...

posted @ Friday, August 20, 2010 3:41 PM | Feedback (0)

Recycling SharePoint 2010 app pool from Visual Studio

One of the things I liked about WSPBuilder was the ability to easily recycle the application pool from Visual Studio, much quicker then messing around with IISReset or IIS manager. With the new deployment framework in Visual Studio 2010, we don’t have that functionality anymore. It’s all very much about deployment. While there are benefits to this approach, sometimes when you’re messing around with stuff it’s good to be able to copy a file to the SPRoot folder, recycle the app pool and see what happens. This is just a quick post, more for my memory than anything else,...

posted @ Wednesday, April 07, 2010 11:58 AM | Feedback (0)

Combining LINQ to SharePoint and LINQ to Objects

Although the join syntax in LINQ to SharePoint is very powerful, sometimes there are situations where you won’t be able to retrieve the data that you need using this syntax. Sometimes there may be operations that you require that are not permitted on the LINQ to SharePoint provider since they are considered inefficient. Performing an in memory sub-query As an example, let’s imagine that our sample application requires a list of asset tags and locations codes for a particular contract, but only where the locations are also being used to store assets that are subject to another contract....

posted @ Tuesday, March 16, 2010 12:08 PM | Feedback (0)

Creating a web service to access BCS data in SharePoint 2010

Programmatically accessing BCS data BCS exposes an extensive object model that allows developers to create clients applications that leverage the flexibility of the BDC service. Using this object model we’ll create a simple web service application that will demonstrate some of the major functions of the API. In Visual Studio 2010 create a new ASP.Net Web Service Application project. Name the project ModelDataWebService.Remember to set the CPU to x64. Add references to: Microsoft.BusinessData (listed as Microsoft® SharePoint® Foundation Business Data) and Microsoft.SharePoint. Connecting to the BDC Service Add a new web method as follows: ...

posted @ Monday, March 15, 2010 10:14 AM | Feedback (3)

Using the Refinement Web part in SharePoint 2010

20 Aug 2010 Update : I’ve added an article on creating custom refinement generators here. The RefinementWebPart can be used to automatically generate a series of refinement filters for a given result set. Refinements are basically property filters that derived from a result set. So for example, if a result set contains results of different types such as web pages and Word documents, there refinement web part will show refinement option for only web pages or only Word documents. Let’s look at how the RefinementWebPart works in a bit more detail since a good understanding of the inner...

posted @ Sunday, March 14, 2010 10:20 AM | Feedback (7)

Make a Custom Activity available to SharePoint Designer 2010

Creating custom workflow activities for use in Visual Studio is all fine and well but what happens if we want to make those activities available within SharePoint Designer? Thankfully the process is pretty straightforward. Since SharePoint Designer is a client tool, it’s designed to run remotely as opposed to on the SharePoint Server. As a result of this, when determining which workflow action should be available for use on a particular site, SharePoint Designer connects to the server to retrieve a list of available actions. The list of actions is stored at %SPRoot%\Template\1033\Workflow. In this folder there are a...

posted @ Saturday, March 13, 2010 9:58 AM | Feedback (2)

Joins in LINQ to SharePoint 2010

You may have noticed above that the Join extension method is not permitted within LINQ to SharePoint. However, this does not mean that retrieving related data isn’t possible, only that arbitrary joins are not supported. Where the relationship between two entities is defined by a lookup column, retrieving related data is permitted and in fact is actually achieved using a much simpler syntax than is required by the Join operator. Simple join private void button8_Click(object sender, EventArgs e) { using(SampleDataContext dxRead = new SampleDataContext(SiteUrl.Text)) { StringBuilder...

posted @ Friday, March 12, 2010 9:19 PM | Feedback (0)

Debugging Excel Services UDFs using Visual Studio 2010

Debugging UDF’s is not quite as simple as debugging other SharePoint artefacts. The UDF is called by the Excel Services service application which runs as a separate process. Bearing this in mind we have two options, we can either attach our debugger to all instances of the w3wp.exe process, or we can find out which process is being used to run service applications on out server. Discovering the ProcessID used to run a User-Defined Function Even though I’m sure that everybody will take the lazy option of attaching to all worker processes, here’s how we can find out...

posted @ Thursday, March 11, 2010 9:02 PM | Feedback (0)

How Deploy a WCF Service To SharePoint 2010

The new packaging and deployment stuff for SharePoint 2010 is certainly a lot better than VSeWSS but there are a few things missing, such as the ability to add a WCF service as a project item. One of these days I’ll build a template to do it but for now here’s a quick step by step guide. Add SVC file to Layouts folder To make a Windows Communication Framework service available we need to host it somewhere. Since SharePoint runs on IIS, we need to create a .svc file with details of the service implementation. Of course before...

posted @ Wednesday, March 10, 2010 8:39 PM | Feedback (2)

Extending Linq to SharePoint

I’ve been doing a lot of work with Linq to SharePoint over the past month, creating content for my new SharePoint 2010 development book. You know it’s a strange thing writing a technical  book, when you first start out you wonder how you’ll fill the pages. As you get into it though you very quickly find that there’s a lot more stuff you’d like to add but don’t have the space. I like to take things to bits completely before I start wiring about them. It’s always good to know where the limits are before you think about scenarios...

posted @ Saturday, January 23, 2010 6:52 PM | Feedback (2)

Full SharePoint 2010 Archive