By comparing the values in the before Properties with the after Properties I could see if they contained a difference.If it doesn’t, the updating event should not happen again.First, we declare a boolean to hold the original value of the Event Firing Enabled property.
Too bad that original question is IMO too localized (I voted close).
Now I regret it because your answers contains valuable info.
The event receiver was nicely attached and got busy when I uploaded a document. I was trying to change permissions on an item and this was the part of my code that was creating the problems: Inside my SPRemote Event Type.
Item Updated I did an Update and making it trigger itself. If you’re dealing with a event receiver with access to server side code, this is not a problem.
In this Item Updated event, we are simply assigning the current List Item to a new SPList Item object, changing its "Title" property, and updating it. However, this simple piece of code will cause an endless loop, as each time you call list Item. As you can see, we need a way to prevent this loop from occuring.
Luckily there is an easy and elegant solution with a little custom code.This was my scenario: I had created a remote event receiver that was attached to a document library and was supposed to act whenever an item in the list was updated.The initialization of the event receiver looks like this: And all was fine in the world.tl;dr: If you have trouble with stopping the updated-event from firing, compare what you want to change in the before Properties and after Properties.If they are different, you should go ahead with your update, otherwise not.How I solved it Googleing this helped me not one bit and my first solution was something I would like to hide at the bottom of some server (I don’t want to talk about it, let’s just say it had something to do with counting the seconds since the last update).