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

There's seemingly loads of ways of overriding the OOTB e-mail notifications for creation and deletion of user alerts - can't you just attach an event receiver to the alerts 'list' (is it an SPList?) and on itemadded/itemremoved just manage your own?

share|improve this question
add comment

1 Answer

Microsoft always refers to the Alerts as a collection.

It turns out alerts are located on a couple tables in the DB and not really related to any scoped object. So it looks like an Alerts LIST is entirely ruled out.

Short answer is no, not like that.

Long answer is, sure, I would probably do it like this...

Here is an old article on the structure of an alert: http://blogs.technet.com/b/steve_chen/archive/2009/11/20/alerts-in-sharepoint-troubleshooting-moss-wss.aspx?PageIndex=3#comments I trust it because of the very recent comments from the blog author without a structural change to the article after the release of 2010/2013

If you REALLY wanted to do something to alert you to the creation of new alerts you could write a SQL timer job (unsupported, don't do it, ack... it even tastes bad to type)

You should be able to create your own alert update list and have the interface handler for alert updates make entries in that sharepoint list with the info from the alerts (Better, maybe even supportable)

That way you could make an alert on that list and make sure you get notified when alert update events you like are created. If I were to do it, I think that is the method I would choose. You will end up running that code for every alert update, but you would have a record of what folks in your org were doing with alerts, and judging by your previous posts it looks like that may be worth the overhead/effort.

I would start by reading this again:

http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2007/12/14/how-to-customizing-alert-emails-using-ialertnotificationhandler.aspx

You will see how to implement an IAlertHandler and use the NotificationHandlerAssembly in the template XML to point to it. My guess for how to accomplish what you are trying to do is to implement a custom handler for the UpdateHandlerAssembly. Here is an XML snippet for the CallTrack Alert Template in the XML file located at (12 or 14)\TEMPLATE\XML\alerttemplates.xml

<Properties>
  <UpdateHandlerAssembly>Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</UpdateHandlerAssembly> 
  <UpdateHandlerClassName>Microsoft.SharePoint.Applications.GroupBoard.CallTrackingAlertHandler</UpdateHandlerClassName> 
  <UpdateHandlerProperties /> 
</Properties>

A quick google search gave me hope that you could make these changes http://msdn.microsoft.com/en-us/library/bb897791(v=office.12).aspx for example talks about methods that are called when updates are made to alerts. Of course if you create a handler for the UpdateHandler you have to provide all the methods that the Update process uses.

share|improve this answer
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.