Stu
2010-04-29 20:08:12 UTC
Hi all, I have an issue that I can't seem to get my head around - some help
would be appreciated!
So all I am trying to do for the moment is query three fields with an event
receiver.
The receiver is tied to a list on the itemupdating() event.
The code is below and all fields have existing values in them.
The ER should simply return the values in the fields and cancel the update.
It does correctly cancel the update, and displays the 'error' page so there
is no bug in the code, but it does not display the value within either field
(it displays "" // "")
Can anyone see what might be going on here?
-----
public override void ItemUpdating(SPItemEventProperties properties){
properties.ErrorMessage =
properties.AfterProperties["Actual_x0020_Award_x0020_Quarter"] + " // " +
properties.AfterProperties["Actual_x0020_Award_x0020_Date"];
DisableEventFiring();
properties.Cancel = true;
properties.Status =
SPEventReceiverStatus.CancelWithError;
EnableEventFiring();
}
would be appreciated!
So all I am trying to do for the moment is query three fields with an event
receiver.
The receiver is tied to a list on the itemupdating() event.
The code is below and all fields have existing values in them.
The ER should simply return the values in the fields and cancel the update.
It does correctly cancel the update, and displays the 'error' page so there
is no bug in the code, but it does not display the value within either field
(it displays "" // "")
Can anyone see what might be going on here?
-----
public override void ItemUpdating(SPItemEventProperties properties){
properties.ErrorMessage =
properties.AfterProperties["Actual_x0020_Award_x0020_Quarter"] + " // " +
properties.AfterProperties["Actual_x0020_Award_x0020_Date"];
DisableEventFiring();
properties.Cancel = true;
properties.Status =
SPEventReceiverStatus.CancelWithError;
EnableEventFiring();
}