I am currently facing challenges in distinction between updating an item, and creating a new version of same item. The ItemUpdating eventreceiver is hit in both cases.
Requirements for the library are following...
- Restricted, so that no metadata chan be changed in the library after creation of an SPListItem
- Allow a file to be versioned, but without any changes in metadata that are presented to the user.
I am aware of the sequence of events with this setup. They are also mentioned in Damon Armstrong writeup on eventreceivers (Armstrong, 2012). Armstrong addresses the distinction between a check-in and other events...
if (properties.AfterProperties["vti_sourcecontrolcheckedoutby"] == null && properties.BeforeProperties["vti_sourcecontrolcheckedoutby"] != null)
Are there any simular indicators that chan be checked, when distincting the origin of the ItemUpdating event receiver?
Armstrong D., 2012 Managing ItemUpdating and ItemUpdated Events Firing Twice in a SharePoint Item Event Receiver [Online] available from: http://www.simple-talk.com/dotnet/.net-tools/managing-itemupdating-and-itemupdated-events-firing-twice-in-a-sharepoint-item-event-receiver/ (Accessed: 20.NOV.2012)