Is it possible to prevent Sharepoint framework to call ItemUpdated event method, after ItemAdded? I want ItemUpdated to be called only when the item is edited. I don't want to let sharepoint call ItemUpdated after ItemAdded.


Is it possible to pass a parameter from ItamAdded to ItemUpdated event method?

  • it looks like you have been trying to use incorrect approach. Could you describe your issue? – Alexander Sep 16 '12 at 8:37
  • First I want to say that I am using a static variable to get a value in item updating method and I use it in item updated method (i'm doing the same for delete). I don't know if this will work for your case, but you can try it. I am waiting for your feedback. – user24196 Mar 6 '14 at 13:22

For your first question, the answer is yes. If you are using SharePoint 2010, then you can use following code in the ItemAdded event to prevent ItemUpdated event being called:

    EventFiringEnabled = false;       
    //your code implementation       
    EventFiringEnabled = true;

If you are using MOSS 2007, you can use following code

   //your code implementation

For the second question, I don't think it is possible.

  • 1
    For the second question you can use additional field in list item which should be hidden. But in my opinion, the behevior when the item updated event is invoked after item adding event is incorrect. I think that user10606 did something wrong. – Alexander Sep 16 '12 at 9:15
  • sharepoint.stackexchange.com/a/45470/627 Basically the same – eirikb Sep 16 '12 at 10:58
  • 1
    @Alexander and how do you plan to persist a new value to that field? ;) calling Update()? and I dont think disabling event firing will keep itemUpdated from firing when adding a file. The reason ItemUpdate is called is that the provisioning of the file is a two step process: first the file is added, then the metadata (as i remember it). When adding publishing pages, ItemUpdated is called several times. Disabling event firing is ment to short circuit getting recursive loops when calling Update() in an ItemUpdated event receiver. – Anders Rask Sep 16 '12 at 19:59
  • @AndersRask, the question does not contains information about type of item, thus I thought that this question is about typical list item, not a document. Also you are right, I mixed up ItemAdding and ItemAdded method. In the fist method you can use AfterProperties to set up value in the hidden field. – Alexander Sep 16 '12 at 20:55
  • Have you tried this? Im pretty sure you cant set them (they are only get properties) other than by setting a value in the field itself. It might work, but before/after properties work differently on different types of items, and often not the way you would expect... – Anders Rask Sep 16 '12 at 21:04

Check following link, in this link there is solution for "Share value between itemupdating and itemupdated events in SandBox Event receiver "


  • 2
    Please do not post link only answers, instead add the details from the link to your post and use the link as merely a source – Robert Lindgren May 5 '14 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.