In which I show how you can write CAML queries that are understandable, and show how you can query 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. :-) ......
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 ......
Logging to a list in SharePoint is an option many are using. I show a simple way to do this.
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 ......