SPListItem update conflict
-
04-10-2020 - |
Question
Task: when user updates an item, change synchronously another hidden field of this item. Problem: save conflict occurs AFTER update is called (not on this line).
- I subscribe on EventReceiver's
ItemUpdating
method - I use SystemUpdate instead of Update.
- EventFiring is off
- AllowUnsafeUpdates is true
But I still get the same error. What is wrong with this code?...
public void SyncTextFields()
{
_listItem["Investigation_Exporter_Text"] = Exporter;
_listItem.SystemUpdate();
}
La solution
I used SPItemEventProperties.AfterProperties
instead of inner SPListItem and it worked fine. Thanks for reply. I'l try to set Synchronous and check if it help.
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange