Question

I have written my Custom function into the EventReceiver created on Tasks.

public override void ItemDeleted(SPItemEventProperties properties) { base.ItemDeleted(properties); MYCustomFunctionforDelete(properties); }

I want to save the TaskName into my CustomList, when I delete any task from TaskList.

I am able to get the Name of TasksList, but not finding TaskName which is going to delete.

How can I do this ?

Was it helpful?

Solution

I think you should be using the ItemDeleting event to get the name of the task. Since ItemDeleted event happens after the item is deleted you cannot get information about something that already does not exists. There is a reference about the event properties : http://www.c-sharpcorner.com/blogs/4223/before-propertiesafter-properties-and-listitem-in-sharepoin.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top