What event is triggered when a document is saved in a Document Library in SharePoint?

有些话、适合烂在心里 提交于 2020-01-14 03:10:27

问题


We have a document list that contains Excel sheets, the documents that are in the list have to be processed. The processing code is triggered by the EventReceiver.

Until know we used the ItemCheckedIn event, but this isn't triggered when the user just saves a document from within Excel. I have tried to use the ItemUpdated event, but that doesn't seem to work either.

So I'm wondering whether there is an event that is triggered when a user saves the document from within Excel.


回答1:


There are Before and After events when updating/adding list items. Here is a comprehensive list of all of those events:

Before Events

  • ItemAdding
  • ItemUpdating
  • ItemDeleting

After Events

  • ItemAdded
  • ItemUpdated
  • ItemDeleted
  • ItemAttachmentAdded
  • ItemAttachmentDeleted
  • ItemCheckedIn
  • ItemCheckedOut
  • ItemFileConverted
  • ItemFileMoved
  • ItemUncheckedOut



回答2:


ItemAdded?

It's a little confusing since one event handler gets called when the document is initially saved and ItemUpdated gets called when you set any custom properties on the item, at least if you're using the default SharePoint web UI.



来源:https://stackoverflow.com/questions/1707634/what-event-is-triggered-when-a-document-is-saved-in-a-document-library-in-sharep

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!