Tag Info

New answers tagged

0

you can try something like this before your event receiver code if (properties.AfterProperties["vti_sourcecontrolcheckedoutby"] == null && properties.BeforeProperties["vti_sourcecontrolcheckedoutby"] != null) { //This is when the update event is triggered by check-in. } else { //This is triggered by events other than check-in action. ...


0

Just an alternate workaround if nothing else works.Since there is no built in method which mimics this.EventFiringEnabled the only way is to set a flag outside this item which will enable us to know whether the current update event is called by a genuine update through browser or external code or from an update called from an update event. Create another ...


7

I hade the exact same problem last week and found no built in way of solving it. What I ended up doing was checking the value of beforeProperties and afterProperties of what I wanted to update, and if there was no difference, then I broke out of the method. I actually wrote a blog post about it. This is an annoying problem that I hope Microsoft improves in ...


0

Why don't you check item last updated date, if it is within last 1,2,3 minutes then skip updating the item second time ? DateTime lastModifiedTime = Convert.ToDateTime(properties.ListItem["Modified"].ToString()); If(lastModifiedTime < DateTime.Now.AddMinutes(-2)) { // update the item }


1

this.EventFiringEnabled = false; is used in Server object model. However, there doesn't seem to be its equivalent in Client object model. So the alternative is to check the field value first before making any changes to avoid the update operation recurrence. See similar question here: ...



Top 50 recent answers are included