How to distinguish between an item move and a deletion
-
15-01-2021 - |
Question
I have a question about SharePoint 2010
and the technical differentiation between an item move and a deletion in an event receiver
.
As I could see, when moving a document to another library, the ItemDeleting
and ItemDeleted
events are also called.
So how do I differentiate in the event receiver whether a document is really deleted or just moved to another library?
Has anyone here already gained experience?
Solution
I've got the answer.
In the SPItemEventProperties
in the event receiver
is the property AfterUrl
.
On deletion this property is null
, on movement it contains the new url of the item.
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange