Hi,
I have a complex event receiver with ItemUpdated method, where I create new Item to the custom SP List.
I use this code, but after in one minut this new item is deleted from the list, and I dont understand, who is the problem
SPSecurity.RunWithElevatedPrivileges(delegate()
{
if (properties.ListTitle == "LIST")
{
string siteUrl = "http://site";
using (SPSite site = new SPSite(siteUrl))
{
using (SPWeb web = site.OpenWeb())
{
...
web.AllowUnsafeUpdates = true;
SPListItem newItem= SPlist.Items.Add();
newItem["Name"] = web.EnsureUser(user.LoginName).ID;
newItem["Date"] = "----";
....
newItem.Update();
web.AllowUnsafeUpdates = false;
....
}
}Please help!
Thanks,
Mykie