PowerEventReceivers Script ist not executed

Apr 14, 2010 at 1:07 PM
Edited Apr 14, 2010 at 2:05 PM

Hi,

i've installed PowerEventReceivers without any Problems, Activated the feature for my website an created a simple Script for testing purposes:

function ItemAdded
{
$properties.Cancel = $true
$properties.ErrorMessage = "Message Text"
}

I would expect not to be able to add new Items to my list any more, instead I should get an error with the Message "Message Text". Unfortunatly nothing happens, I'm still able to add a new item. I do not see any errors either in the Application Event Log or other Sharepoint logs. Powershell ist installed, .NET Framework 3.5 also. WSS Version is 12.0.0.6524, Sharepoint Language is German. OS is Windows 2008 Server English.

What is wrong or what can I do to investigate further?

Thanks!

 

Coordinator
Apr 14, 2010 at 2:33 PM

Hello,

in SharePoint 2007 you can only cancel synchronous events e.g. IteamAdding.

Bye, Christian