Geeks With Blogs
Reidar Husmo SharePoint from the trenches SharePoint 2010 SharePoint 2010 development
Edit multiple items as ribbon button

Adding ribbon buttons can be a frustrating process. I show how to do it the fast way during development, for easier troubleshooting.

Posted On Tuesday, January 29, 2013 12:40 PM

Finding the error from a correlation ID

We create an application which searches the SharePoint log for events matching correlation guids it finds on the clipboard. I.e. copy the correlation ID SharePoint gives you, switch to this application, and enjoy.

Posted On Tuesday, November 20, 2012 1:08 PM

Html pages in SharePoint
By default, SharePoint 2010 will not let you show html pages in the browser. If you add them to your site, either using upload or SharePoint Designer, the browsers will prompt you to save the file. It is easily remedied; open central admin, manage web applications, select web application, general settings, and change "Browser file handling" to permissive. Ah, but what if you do not have access to CA - like in Office 365? The official answer is simple: "Not supported" If you can rename the files, ......

Posted On Saturday, June 30, 2012 2:21 PM

Running Powershell from within SharePoint

This post explains how you can run a (SharePoint) Powershell command from C#/SharePoint.

Posted On Wednesday, September 19, 2012 1:17 PM

Creating large SharePoint structures from Powershell and xml, part ii

In this second part, we show how we can build an xml structure from information we get from SharePoint. This xml can later be edited, and used as input to the SharePoint creator from part i.

Posted On Saturday, June 30, 2012 7:21 PM

Office14 guids
Ok, perhaps not the most meaningful post today, but I haven’t seen it mentioned anywhere else. Crank open a SharePoint web.config, and scroll down to the "action" elements. <Action id="0ff1ce14-0001-0002-0000... <Action id="0ff1ce14-0001-0003-0000... <Action id="0ff1ce14-0001-0004-0000... <Action id="0ff1ce14-0001-0005-0000... <Action id="0ff1ce14-0001-0006-0000... etc. Cute ......

Posted On Thursday, April 26, 2012 2:51 PM

Creating large SharePoint structures from Powershell and xml

In this two-part series, we show how we can (easily) create large SharePoint structures using Powershell and xml - and hashtables(!?)

Posted On Saturday, June 30, 2012 6:25 PM

SharePoint PowerShell Error: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.

So you've already checked that you have the necessary rights.

Did you install Powershell 3.0 CTP?

Powershell 3.0 CTP seems to have some issues with the SharePoint snapin, and will not give you the above error. Uninstall it, and things start working again.

Posted On Thursday, April 19, 2012 4:58 PM

Creating SharePoint sites from xml using Powershell
It is frequently useful to create / delete web applications in a development environment. If you need to create a structure, this can quickly become tedious. Enter Powershell, xml and recursive functions. Create the structure in xml. Something like: <Sites> <Site Name="Test 1" Url="Test1" /> <Site Name="Test 2" Url="Test2" > <Site Name="Test 2 1" Url="Test21" > <Site Name="Test 2 1 1" Url="Test211" /> <Site Name="Test 2 1 2" Url="Test212" /> </Site> </Site> ......

Posted On Thursday, April 12, 2012 2:53 PM

CAML queries for humans

In which I show how you can write CAML queries that are understandable, and show how you can query from Powershell.

Posted On Wednesday, March 28, 2012 10:40 AM

Executing timer jobs from Powershell
Starting timer jobs from Powershell is easy.Get the job, execute:$webApp = Get-SPWebApplication "http://$($env:computername... = $webApp.JobDefinitions | Where-Object { $_.Name -eq "<timer job name>"}$job.Execute([Sys... # In my timer job I don't actually use the guid, so just create a new oneWrite-Host "Done."...mostly as a reminder to myself. :-) ......

Posted On Tuesday, March 20, 2012 12:14 PM

List item stuck in "Pending"
Problem simplified: On approval, you have an event receiver that changes a field according to some weird and wonderful business logic. But the item remains in "Pending" state. Why? First, you obviously need to turn off the event handling when you change things in the event receiver. If not, the event receiver will be called because the item changed. Infinite recursion is a bad thing. But you guessed that. But that's not what was wrong. The culprit in my case was that items are set to require a new ......

Posted On Thursday, March 15, 2012 4:06 PM

SharePoint logging to a list

Logging to a list in SharePoint is an option many are using. I show a simple way to do this.

Posted On Thursday, March 15, 2012 10:22 AM

Cheating at SharePoint presentations

Add a simple PowerShell script to your presentations to cache pages you're about to demo.

Posted On Monday, February 13, 2012 12:22 PM

SharePoint Powershell try catch gotcha
SharePoint 2010 developers love Powershell. It really is a huge step forward. If you still haven't started to use it, do so. But I got bit the other day, when I added a try-catch block to my code. See if you can spot it: Try { $legen = Create-Object Reidar.Husmo.AwesomeClass $legen.Dary(42) } Catch { "an error occurred" } As you no doubt immediately spotted, Powershell does not have a Create-Object. But the try-catch hides coding mistakes. There is no indication that things are not ok, not even "an ......

Posted On Monday, February 13, 2012 3:49 AM

SharePoint administration pages
A quick note - possibly "note to self" - about how you can add administration pages to central administration ("CA"). Start with an empty SharePoint project.Add a mapped folder - to Template/admin.Add an application page to this folder. This is a three step process; add the page, move it from the layouts folder (where Visual Studio decided that you really wanted it), and rename the namespace. Next you'll want to add this page to CA. Do this by adding a custom action group and a custom action. Cksdev ......

Posted On Monday, February 13, 2012 2:41 AM

Copyright © Norgean | Powered by: GeeksWithBlogs.net