sharepoint
15 10 2011
Here’s a quick video about adding a search connector into Windows Explorer – really cool feature I’ve only just discovered. Probably because I spent too much time buried in Visual Studio writing CAML and C#. Anyway, here it is – enjoy! 🙂 Update: I forgot to point out that the Search Connector in Windows is […]
13 10 2011
Out of sheer curiosity and boredom, I’ve decided to have a poke at the huge query that is provided in the developer dashboard and shows up for nearly every page you load in SharePoint that has something to do with List Items. The query in particular is the one that starts ‘DECLARE @DocParentRefForRF’, and when […]
11 10 2011
Here’s a little snippet of code to grab the MySite host of the current environment using jQuery to pick it out from the user’s Welcome Menu.
|
var str = $('#ID_MySiteMenu').attr('onMenuClick');<br>var myHost = str.substring(str.indexOf('http://'),str.length-2);<br>alert(myHost);<br> |
Nice and simple!
8 10 2011
Disclaimer:Â The examples shown in this post are extremely unrealistic in terms of real-life scenarios. The numbers and types of fields used in these experiments are designed purely to test the physical limitations of SharePoint. At no point is it suggested that a real-life use of such list architecture be used. If you do have lists […]
22 08 2011
Thought I’d take some time here to plug my company’s newly launched training delivery branch out in Brisbane, Australia (and it’s been a wee while since my last post!). Intelligent Decisioning Pty in Australia are now a Critical Path Training partner, have opened up several training workshops in October, delivering training materials from Critical Path […]
8 07 2011
As part of my series of blog posts on item level permissions, I thought I’d post a quick note on “resetting” item-level permissions on a list. This can be done using the method SPListItem.ResetRoleInheritance() on the list item in question. This will reset any item level permissions on this item to inherit from the List […]
9 06 2011
As part of my series on performance, I thought I’d look at updating large (20,000 item) lists in bulk, and what are the fastest ways to do this. I’ve gone through a few different ways of doing this, finding out where the slowness is coming from, and I present the results of the analysis in […]
1 06 2011
After this question was asked on SharePoint Stack Exchange, I thought I’d share my method of re-ordering content types in a list. Note: this isn’t the only method of doing this, see the thread on SPSE to see more (particularly the UniqueContentTypeOrder property).
|
private void ReorderContentTypes(SPWeb web, string listName, string firstContentTypeName)<br>{<br> SPList list = web.Lists[listName];<br><br> SPContentType cType = web.AvailableContentTypes[firstContentTypeName];<br><br> List<SPContentType> oldCTypes = new List<SPContentType>();<br><br> for (int i = list.ContentTypes.Count -1; i >= 0; i--)<br> {<br> if (!list.ContentTypes[i].Id.IsChildOf(cType.Id))<br> {<br> oldCTypes.Add(list.ContentTypes[i]);<br><br> list.ContentTypes[i].Delete();<br> }<br> }<br><br> foreach (SPContentType c in oldCTypes)<br> {<br> list.ContentTypes.Add(c);<br> }<br><br> list.Update();<br>}<br> |
18 04 2011
So you’ve embarked on writing a bit of code that must enumerate a SharePoint List’s Items one by one and do some stuff with them. You’ve (at some point) came across the Best Practices page on MSDN on Handling Large Folders and Lists, and seen that using SPList.Items is bad. It’s bad because you could […]
6 04 2011
In a Site-Scoped Feature, have this line in the Elements.xml:
|
<featuresitetemplateassociation templatename="STS#0"></featuresitetemplateassociation><br> |
The Id here is the GUID of a Web-Scoped Feature you want to activate every time a Sub-Web of template STS#0 (Team Site) is created. Simples.