Hello All,
before some days I was working with the SharePoint list items and their events.
I just wanted to add small suggestion here that while working with the SPItemEventReceiver class or with the class that inherits from SPItemEventReceiver, we oftenly override the methods like
ItemAdding , ItemAdded, ItemUpdating, ItemUpdated.....etc
so many times scenario comes that we need to update something in the list and on some event but other events are stopping that
so to avoid this error
use
this.DisableEventFiring();
//update list or any listitem here
this.EnableEventFiring();
this works fine and avoids error.
please let me know If you find any improvement to be done in this.
No comments:
Post a Comment