Event handling for sharepoint lists RRS feed

  • Question

  • Hi,

    I have a sharepoint list to which I want to add an event handler, but I want this event handler to only fire if a user updates an entry and not when a piece of code updates a few entries, or when a bulk update is made using datasheet.

    Is it possible ?

    Wednesday, August 19, 2009 1:19 PM


  • It is possible indirectly. You can create a site column and keep the value as Yes/No with default value of N. Since user edit the values on EditForm.aspx. so set the value of this field as Y using javascripting & keep the field as hidden on editform.aspx using javascripting. Inside event handler only update if value is Y. and after executing the event handler code in case of Y, set it back to N. It does not look pretty but this way it will work.

    You can carry a flag information as i mentioned above to handle such situation. Event handler will execute all the time from any update but you will control your code block based on flag information.

    Moonis Tahir MVP, MCPD,, MCTS BizTalk 2006/SQL 2005/SharePoint Server 2007 (Dev & Config)
    • Marked as answer by Chengyi Wu Friday, September 4, 2009 2:09 AM
    Wednesday, August 19, 2009 4:59 PM