Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

ItemAdded event receiver updating item property strange behavior

  Asked By: Norma    Date: Oct 11    Category: Sharepoint    Views: 3540

A document library with custom properties, such as "Year". In
itemAdded event receiver, with code snippet like the following:

item = web.Lists[properties.ListId].GetItemById(properties.ListItemId);
item["Year"] = "2007";

Above code works fine when using "Upload Multiple Documents" from the
"Upload" menu; however, if using "Upload document" from the same menu,
after browsing the file, on the editform page to edit properties,
click on the OK then it gives a error message like the following:

Also please note during debugging mode, the event receiver code does
not generate any exceptions, so the problem lies after the event has
been processed.

Anyone has any suggestions on this?



No Answers Found. Be the First, To Post Answer.