tags:

views:

30

answers:

2

Hi i'm implementing an eventreceiver, my question is simple : how to get the name and/or the display name of the column of the current item that is being changed ?

Thank you.

A: 

you can get it two ways

  1. Try to edit that colum, then you can see the name of colum with page URL as querystring
  2. create caml query using caml query buider, then you get the changed name.

Hope this helps. Let me know if you need more help or not this you are looking for.

Hojo
+2  A: 

You will have to programmatically determine which column has changed. I don't believe there is any property that will give you a list of the fields that have changed.

In your ItemUpdating override, compare the keys/values in BeforeProperties and AfterProperties. (this post has a great overview of what to expect)

Kit Menke
thanks, but in case of a list "the BeforeProperties hash table is not populated for items on a list" as described here http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=25.Edit : i checked out the post, it seems we've been looking for the same thing ;)
Don Carnage
Sorry... my answer was referring to a Document library but the link gives the outline for both a List and a Library. :)
Kit Menke