Greetings,
I've written my own ContentType definition that can be applied to any Document Library. I would like to preserve the data associated with an item via my ContentType when that item is copied by the user to a Document Library to which my ContentType definition is not yet attached.
The obvious thing to do, it seems, is to catch either the ItemAdding or ItemUpdating event for the new item, look at the source item to see if my ContentType is associated with it, and then add my ContentType to the destination Document Library prior to the copy actually happening.
The problem is, I can find no information in these events that tells me what the source item is. The only such data is in the final ItemUpdated event, but by then it is too late...the item has already been copied and the data associated with my ContentType discarded.
Anyone have any ideas as to how I can get the behavior I want?
TIA for any help!
Steve
PS: The one thing I guess I can do is get the source Url in the ItemUpdated event, and then write code to add the ContentType and also manually move the data associated with that type in the source to the destination. This just seems very inelegant compared to the solution I propose above.