I have created a list "Modification Log".Then a workflow for ADD and EDIT.How Can I get "Deleted By" like "Created By" and "Modified By".Please help to have a solution for delete also. This is my code
private void onWorkflowActivated1_Invoked(object sender, ExternalDataEventArgs e) {
SPWeb oSPWeb = workflowProperties.Web;
oSPWeb.AllowUnsafeUpdates = true;
SPList oSPList = oSPWeb.Lists["Modification Log"];
SPListItem oSPListItem = workflowProperties.Item;
SPListItem oSPListItm = oSPList.Items.Add();
oSPListItm["Project Code"] = oSPListItem["Project Code"];
oSPListItm["Project Details"] = oSPListItem["Project Details"];
oSPListItm["Resource Name"] = oSPListItem["Resource Name"];
oSPListItm["Department"] = oSPListItem["Department"];
if (Convert.ToString(oSPListItem["Modified By"]) != string.Empty)
{
oSPListItm["Operation Done By"] = oSPListItem["Created By"];
oSPListItm["Operation"] = "ADD";
}
else
{
oSPListItm["Operation Done By"] = oSPListItem["Modified By"];
oSPListItm["Operation"] = "EDIT";
}
oSPListItm.Update();
oSPWeb.AllowUnsafeUpdates = false;
}