Development
Development
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...
When doing development on a SharePoint dev server, there may be the need to create multiple web applications. To prevent conflicts there are two possibilities: either use host headers or use a different port. To support host headers we can either add additional DNS entries or use the HOSTS file (C:\Windows\System32\drivers\etc). Since my dev servers generally run as isolated VM’s, creating DNS entries isn’t an option. As a result I’ll commonly make modifications to the HOSTS file such as: # Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for...
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....
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: ...
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...
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...
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...
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...
December’s looking a bit bare on my blog calendar. I thought I’d better add something before the festivities begin. In truth I’ve been pretty busy over the past few weeks. I spent a few days doing an excellent CTT+ course at Rezound in Sheffield plus I’ve also just started work on a new SharePoint 2010 book for McGraw-Hill. That’s not to mention my outstanding commitment to Wrox to deliver a short e-book on SharePoint 2007 Packaging and Deployment, my ongoing development work and the joys of having two children, one of which hasn’t quite grasped the concept of sleeping yet!...
Ever wanted to be read the Status text displayed on WrkStat.aspx programmatically so that you can make use of it elsewhere? No? Can’t blame you! However, let’s say that you do fancy a bit of masochism. Here’s how it works: The status value is stored in a field of type SPFieldWorkflowStatus. Generally this field has the same display name as your workflow although it’s internal name will be different. Getting the internal name is a pain, for some bizarre reason Microsoft decided to expose this as an internal property rather than public. (See SPWorkflowAssociation.InternalNameStatusField). After...
Full Development Archive