Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to detect when a user opens a document in a specified list, and log their view in another list, however I see no method in SPItemEventReceiver for detecting such an event:

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventreceiver_methods.aspx

Am I looking in the wrong place, or does this functionality not exist?

Thanks.

share|improve this question
    
I guess if it doesn't, one workaround would be to write a user control and add it to the view page. When the view page is hit, I can record the hit... –  Jamie Carruthers Mar 17 '11 at 23:00
add comment

1 Answer 1

A user control is not going to track a document being opened. You may want to have a look at SharePoint's internal auditing facility to track if a document has been opened, then create a job to periodically process new 'open' events.

As you say, there is no 'open event handler' in SharePoint, which is a great shame.

share|improve this answer
    
My plan was to use the user control to detect when a document is opened, then write the code to add the open event to another list. Is this what you mean when you refer to a SP job? msdn.microsoft.com/en-us/library/cc406686(v=office.12).aspx –  Jamie Carruthers Mar 18 '11 at 9:42
    
That is what I meant with 'a job'. How are you planning on detecting a document being opened using a user control? –  Muhimbi Mar 18 '11 at 16:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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