The mysterious SPItemEventProperties.AfterProperties

What you can/cannot access in BeforeProperties and AfterProperties in list event receivers can be mysterious.

Here is a very good/clear description of what you can expect when and where: http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=25

In addition to what’s in the above link, I found that for ItemUpdating and ItemUpdated, AfterProperties will contain:

  • Only fields that have changed IF the list item was being updated through code (e.g. your custom app)
  • All fields in the edit form, even if they have not been changed, IF the list item was being edit through the OOTB GUI.

The 2 behaviours above may be consistent with each other. An explanation could be that the OOTB GUI simply inserts all incoming values from the form into the item regardless of whether they were updated by the user.

Advertisement

About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.
This entry was posted in SharePoint. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s