Category Archives: SharePoint 2010

Adding Browse button to pick a document when creating Link to a Document

The OOTB Link to a Document content type is quite neat. It allows you to create a link to documents in other locations in your site. External links are also possible. The user experience is quite poor. The user either … Continue reading

Posted in SharePoint 2010 | 7 Comments

Null reference exception when adding content type to document library at Microsoft.SharePoint.SPFile.UpdateInternal

I was adding content types to a document library using C# and got a Null reference exception when calling SPList.ContentTypes.Add(contentType). The stack was: My code to add the content type was fairly innocent: It turns out that it was because … Continue reading

Posted in SharePoint 2010 | 1 Comment

Colour coding event types on SharePoint calendar

On a SharePoint calendar you might have different event types, e.g. Birthday, Meeting or Holiday. Wouldn’t it be nice if you can display these events on the calendar and colour code them by event type? Well you probably can achieve … Continue reading

Posted in SharePoint 2010 | 1 Comment

URL for Windows Authentication in SharePoint 2010

When using Claims Authentication in¬†SharePoint 2010 you can configure multiple authentication providers for your site. Specifically, you can use both Windows Authentication and Form Based Authentication – and your site users can choose which method to use to authenticate to … Continue reading

Posted in Claim Authentication, SharePoint 2010 | 4 Comments

How to add new SPNavigationNode to Quick Link as type Link and not Heading

In SharePoint 2010, if you add a new SPNavigationNode as a child to a Heading link, then the type of the new link will automatically be Link: If you however add it as a root level node, then the type … Continue reading

Posted in Branding, SharePoint 2010 | Leave a comment

Error message “Unable to access web scoped feature because it references a non-existent or broken web on site” when performing feature upgrade

I got the error message below when performing a feature upgrade on a web-scoped feature: Unable to access web scoped feature (Id: 0257689c-9e69-4700-a169-004f648d0924) because it references a non-existent or broken web (Id: 90d6c515-a4a7-4f25-a46d-d0505e54d973) on site ‘http://myServer’.¬† Exception: System.ArgumentException: Value does … Continue reading

Posted in Feature Upgrade, SharePoint 2010 | 4 Comments

Walkthrough: Custom field type for uploading and displaying images in SharePoint 2010 lists

—————– UPDATE (2013-06-06): This solution is now also available for SharePoint 2013. Download it here. The 2010 version is still available for download. —————– In SharePoint 2010 the user experience of uploading & inserting images into publishing pages has been … Continue reading

Posted in Custom Field Types, SharePoint 2010 | 136 Comments

How to remove “No results are available. Either no query is specified, or the query came from advanced search (Federated Webparts do not support Advanced Search queries)” when no search keywords are specified

The OOTB Search Core Results web part will show the message below when no search keywords are specified (i.e. no k=blah in the queryString): No results are available. Either no query is specified, or the query came from advanced search … Continue reading

Posted in Search, SharePoint 2010, WebPart | Leave a comment

Removing duplicate web parts when changing page layout via the ribbon

In SharePoint 2010, if a page layout contains web parts, then when you change the page layout via the Ribbon while editing the page, then the page will have web parts of both the previous and the new page layouts. … Continue reading

Posted in Page Layout, SharePoint 2010, WebPart | 5 Comments

GetValidatedString() is not called for custom field type?

I was developing a custom field type that inherits from SPFieldUrl. I overrided the GetValidatedString(object value) method to perform the validation when the field was set to be mandatory. My overriden method however was not called by SharePoint, and hence … Continue reading

Posted in Custom Field Types, SharePoint 2010 | Leave a comment