Now, following the above, I found that when I was working with the discussion group, the only place I could change any fields in the list item was the ItemUpdating method, where I could assign a new value to the properties. An AfterProperties hash corresponding to the name of the element, as mentioned earlier.
Unfortunately, this did not seem to automatically start when a new answer was added to the discussion (perhaps this applies to other scripts related to the list), but if I put the code in the ItemAdded method (ItemAdding also did not start) I found that it starts but I couldn’t change the item from there, so I got something like this in itemAdded:
public override void ItemAdded(SPItemEventProperties properties) { SPListItem item = properties.ListItem; item.Update(); }
The result of this is that the field is updated, but not before it is shown, so when the user is redirected to the output page, the list will look like he did before, but if you change the view or view the details for the answer , you will find that it has really changed, as expected.
This is good enough for me as I expect most of my responses will come by email.
source share