MOSS Forum

 
Home » Forum » MOSS       Ask a questionRSS Feeds

MOSS2007/WSS3 - Error after setting column value during ItemUpdation

  Asked By: Adrianna Dyer         Date: May 08, 2007      Category: MOSS      Views: 2256
 

I have written an event handler overriding ItemUpdating on a standard
document list. The handler sets the value of a ListItem Field (i.e., a
list column). The handler runs as expected, but generates an error as
follows (from the log):

The file Documents/Test Document KJM001.docx has been modified by
SHAREPOINT\system on 02 Mar 2007 01:04:35 -0500.
Possible mismatch between the reported error with code = 0x81070901 and
message: "The file Documents/Test Document KJM001.docx has been
modified by SHAREPOINT\system on 02 Mar 2007 01:04:35 -0500." and the
returned error with code 0x81020037
Error loading and running event recveiver...

Any suggestions on how to overcome this error? I'd considered using
ItemUpdated but I need to access the event's BeforeProperties.

Tagged:                

 

3 Answers Found

 
Answer #1       Answered By: Carey Everett          Answered On: May 08, 2007       

Is the ItemUpdating event  handler updating a field  value on the same
record that the event handler  is attached to? If so, you may be running
into an endless loop as each time you modify the field it kicks off the
event handler again.

 
Answer #2       Answered By: Anuj Lakhe          Answered On: May 08, 2007       

The answer to your question is yes, but I'm surprised that
SPItemEventReceiver would behave that way because it would seem to
severely limit its practical value. Has anyone seen evidence of looping
behaviour such as Monty suggests? If so, how have you overcome it?

 
Answer #3       Answered By: Lee Dickerson          Answered On: May 08, 2007       

The answer to your question is yes, but I'm surprised that
SPItemEventReceiver would behave that way because it would seem to
severely limit its practical value. Has anyone seen evidence of looping
behaviour such as Monty suggests? If so, how have you overcome it?

 


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].