SharePoint

Updates for SharePoint 2010 Products, changed update strategy!

The latest updates can be found on this technet website: http://technet.microsoft.com/en-us/sharepoint/ff800847 I was looking for the August 2011 updates. They are not released yet. But I found an interesting text on the page: The packaging of cumulative updates changed as of August 31, 2011. The following packages are provided for cumulative updates: SharePoint Foundation 2010 SharePoint Foundation 2010 + SharePoint Server 2010 SharePoint Foundation 2010 + SharePoint Server 2010 + Project Server 2010 As a result of the new packaging, it is no longer necessary to install the SharePoint Foundation cumulative update and then install the SharePoint Server cumulative update.

StaticName != InternalName

Recently I was trying to fetch a SPField from a SPWeb object. I had SharePoint 2010, so I decided to use the new SPFieldCollection.TryGetFieldByStaticName() Method. You can imagine how surprised I was, that I couldn’t get the field I was looking for. What do we learn? Well, the StaticName of an SPField is not necessarily the InternalName! Here is a link to the MSDN about SPField.StaticName: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfield.staticname.aspx

Watch out for ContentTypeBindings

If you don’t know ContentTypeBindings, take a short look at: http://msdn.microsoft.com/en-us/library/aa543598.aspx “Content type binding enables you to provision a content type on a list defined in the onet.xml schema.” So we can assign content types to newly created lists. That’s cool 🙂 The ContentTypeBinding feature can, of coarse, contain multiple content types which are bound to multiple lists. Like this: <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <ContentTypeBinding ContentTypeId="0x0100yourGuid" ListUrl="Pages" /> <ContentTypeBinding ContentTypeId="0x0100anotherGuid" ListUrl="Pages" /> <ContentTypeBinding ContentTypeId="

Searchscope contains no elements

With Alternate Access Mappings you add more URLs to a SharePoint webapplication. If you plan to use an alternate URL, you should use only the default URL in rules for a search scope. Otherwise the scope will not contain any items.

SharePoint 2010: Clicking the icon in Type column is highlighting the item instead of launching the document

As the title stats, with SP 2010 a click on the the icon of a listview Webpart does not open the document. This was the default behavior in the previous SharePoint version. Microsoft has realized this, and posted a knowledgebase article to get back the expected click behavior. http://support.microsoft.com/kb/2457975/en-us?sd=rss&spid=14944 The article shows you how to create a new XSLT file, which adds a link tag around the img tag of the icon.

Check, if you are within a modal dialog

By now, you probably know that the modal framework from SharePoint 2010 is a great thing 🙂 In case you need to find out if the context is within a modal dialog, you can query for the URL parameter “IsDlg”. if (Page.Request["IsDlg"] != null) { // within a modal dialog } else { // not within a modal dialog }

Empty Admin Recycle Bin items

What is it? Usually the size of the recycle bin is not relevant. But on development machines, you don’t want lots of files in there, which make your databases grow without actually used data. What do you do? Go to the recycle bin, click on “Site Collection Recycle Bin”. The two stages of the recycle bin can be managed independently. The two views on the left let you switch between the first- and second stage.

PortalSiteMapProvider.GetCachedListItemsByQuery

With MOSS 2007 or SharePoint Server 2010 you can use the PoraltSiteMapProvider of the Microsoft.SharePoint.Publishing.dll assembly to retrieve cached listitems. <span style="color:#606060" id=lnum1> 1:</span> PortalSiteMapProvider ps = PortalSiteMapProvider.WebSiteMapProvider; <span style="color:#606060" id=lnum2> 2:</span> var pNode = ps.FindSiteMapNode(web.ServerRelativeUrl) as PortalWebSiteMapNode; <span style="color:#606060" id=lnum3> 3:</span> var query = new SPQuery <span style="color:#606060" id=lnum4> 4:</span> { <span style="color:#606060" id=lnum5> 5:</span> Query = "<Where><Neq><FieldRef Name='ID' /><Value Type='Counter'>0</Value></Neq></Where>" <span style="color:#606060" id=lnum6> 6:</span> }; <span style="color:#606060" id=lnum7> 7:</span> SiteMapNodeCollection quoteItems = ps.