I want to increment the metadata whenever the copy operation is trigerred.
public override void ItemAdded(SPItemEventProperties properties)
{
try
{
this.DisableEventFiring();
SPSecurity.RunWithElevatedPrivileges(delegate()
{
string oid = string.Empty;
using (SPWeb web = properties.OpenWeb())
{
SPList list = web.Lists[properties.ListId];
SPListItem item = list.Items[properties.ListItem.UniqueId];
String Source=item.CopySource.toString();
}
});
}
Catch()
Here Item>copysource returns empty string So it's difficult for me to check wheter the event has fired due to copy operation