Category Archives: SharePoint

Content type visibility in document libraries

In a document library, once you have enabled content type management and added content types to the library, these content types are visible for the users in 3 places: on the New toolbar menu, when uploading a document when editing … Continue reading

Posted in Content Types, SharePoint | 2 Comments

How to export permission list for a group in SharePoint

When viewing a group in SharePoint, you can view a list of all permissions of that group across the site collection by going to Settings\View Group Permissions. Here is what that would look like: Today a colleague wanted to export … Continue reading

Posted in SharePoint | 4 Comments

Does iterating through SPList.Items using foreach affect performance?

Iterating through SPList.Items using a for (int i) loop is bad for performance, as each call to SPList.Items causes a trip to the DB and will retrieve all items. See http://blog.dynatrace.com/2009/01/11/the-wrong-way-to-iterate-through-sharepoint-splist-items/. I have always wondered whether using a foreach loop … Continue reading

Posted in SharePoint, TypeMock | Leave a comment

File not found error when going to Site Settings of subsite

I had a fresh installation of SharePoint 2010 and everything was all fine. I created a subsite and that was fine too – until I went into Site Settings of the subsite. SharePoint gave me the error below: File Not … Continue reading

Posted in SharePoint | 7 Comments

Can’t see deployed custom field

OK so I couldn’t come up with a concise post title that describes the problem! I was writing XML to deploy a number of custom fields through a feature. The feature activated fine. Two of the three fields were visible in … Continue reading

Posted in Custom Fields, SharePoint | Leave a comment

Can’t edit list forms in SharePoint Designer: soap:ServerServer was unable to process request. —> Value does not fall within the expected range.

In SharePoint Designer 2010 I would always get the error message below when I try to open any list form (DispForm.aspx, EditForm.aspx, etc) for editing. soap:ServerServer was unable to process request. —> Value does not fall within the expected range. … Continue reading

Posted in SharePoint, SharePoint Designer | 1 Comment

LINQ to SharePoint and transaction

In SharePoint 2010 you can use LINQ to insert items into a list like this: using (var context = new DataEntitiesDataContext(http://localhost/)) {        var item1 = new MyListItem();        item1.Comment = “Item 1”;        var item2 = new MyListItem();        … Continue reading

Posted in LINQ, SharePoint | 2 Comments

Tip for lessening the SharePoint pains

An ex-colleague used to say that SharePoint = Share the pains, and he’s mostly right 😀 – particularly around rapid development, debugging and testing.  I have found one particular approach that can greatly lessened those pains, and that is to … Continue reading

Posted in SharePoint | Leave a comment

Catching SPWeb created (provisioned) event

In 2010 the SPWebEventReceiver class has a WebProvisioned method which you could override. There is no such thing in 2007 (doh!!). One way to get around this is to use the method described here: http://sharepointmagazine.net/technical/development/introduction-to-sharepoint-feature-stapling-part-2, which essentially involves creating another … Continue reading

Posted in SharePoint | Leave a comment

Can’t change Display Name (or Title property) of Title field during site provisioning

We have a requirement to change the Display Name (i.e. the Title property) of the Title field of a custom list during site provisioning. The code to do this is simple, but some for reason it would just not work. … Continue reading

Posted in SharePoint | Leave a comment