Solved

Q: how to create SharePoint 2007 alert(workflow) on whenever items in document library are opened?

Posted on 2011-03-14
4
603 Views
Last Modified: 2012-05-11
Hi, SP Experts,

Q: How I can create an alert or a workflow on items in document library of MOSS when they are opened?

Thanks,
-Rick
0
Comment
Question by:RHADMIN
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:psv1973
ID: 35130389
Have you enabled audit logging? You could query the audit log in a timer job and then whenever someone views an item run the code that you need to run.

0
 
LVL 1

Author Comment

by:RHADMIN
ID: 35130550
Thanks, psv1973, I think querying the audit log can just do such a work! Do you have any sample code on this?  
-Rick
0
 
LVL 6

Accepted Solution

by:
psv1973 earned 500 total points
ID: 35130644
How about somthing like this in the execute method of your event receiver:

SPAuditQuery query = new SPAuditQuery(SPContext.Current.Site);
query.AddEventRestriction(SPAuditEventType.View);
query.RestrictToUser(userid);
query.SetRangeEnd(DateTime.Now.AddMonths(-1));
query.SetRangeStart(DateTime.Now);
SPAuditEntryCollection auditCol = SPContext.Current.Web.Audit.GetEntries(query);

auditCol will now contain all View events

0
 
LVL 1

Author Comment

by:RHADMIN
ID: 35130737
Thank you psv1973, I think I am on the right track on solving this problem from your help.
-Rick
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question