views:

725

answers:

3

can somebody help: i have an AddIn which reads contacts from a Sharepoint Server. The user can load a contact and make some changes or create a new one. At his point, saving the item works well. The Form closes and the item is beeing transfered to Sharepoint. But if the user reopens the same contact again and trys to make a simple change, saving is no more possible: The element could not be saved because it was changed by another user or window. Would you like to place a copy in your standard folder" (this a my translation from german to english...) The user must restart Outlook to make his change! I dont know, why the "fxxx" this happens.

I hook into the "Write" event to check some rights and if all is ok i do a

Marshal.ReleaseComObject(item);
this.Dispose();

and call the Garbage Collector:

GC.WaitForPendingFinalizers();
GC.Collect();

Even i write these lines into the FormRegionClosed-Method the problem stays the same.

A: 

Do you reload the contact from SharePoint after saving the first time?

JMD
+1  A: 

Yeehaaaa: found the problem!

in AddIn-Startup a have an event handler for setting the message class on the current item. This item has to be Marshall'd too

tfl
You *can* accept your own answer.
voyager
+1  A: 

Can u just share the code......