Geeks With Blogs
Reidar Husmo SharePoint from the trenches March 2012 Entries
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

Exceptional arguments
So I wrote a method. And decided to check the arguments.And if something was wonky, I'd throw an exception.Or two.And I came across this curiosity in the MSDN documentation:public ArgumentOutOfRangeException( string paramName, string message)public ArgumentException( string message, string paramName)Yup. The arguments to ArgumentException and ArgumentOutOfRangeException are the same. But in the other order. Isn't that exceptional ......

Posted On Tuesday, March 6, 2012 10:25 AM

Copyright © Norgean | Powered by: