How to change a field value during the ItemUpdating event
Posted
by Buzzby
on Stack Overflow
See other posts from Stack Overflow
or by Buzzby
Published on 2010-06-17T21:44:00Z
Indexed on
2010/06/18
7:53 UTC
Read the original article
Hit count: 297
Hi
I am trying to set the value of a field on a ListItem in an event receiver but its not working
All i am doing during the event is
properties.AfterProperties[<field internal name>] = 1;
No errors are thrown but the the field i'm setting does not change. I have also tried
properties.ListItem[<field internal name>] = 1;
properties.ListItem.Update();
Have also tried SystemUpdate();
I know i am meant to be setting the afterproperties but think i am missing an obvious step.
Thanks
© Stack Overflow or respective owner