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 create a web.

I create a doc library within this web.

Create folders within this doc library.

Then 'subscribe' (i.e. create an alert for) a user for this doc library.

Why, if I'm doing things in this order, is the user being notified of the doc library sub folders being created? They shouldn't know about an event that happened prior to the alert being created I'd assume?

share|improve this question

2 Answers 2

up vote 15 down vote accepted
+150

Immediate Alerts timer job "Sends out immediate and scheduled alerts." the documentation says. However, immediate is controlled by a timer job which runs every five minutes by default. So in your case - the possible series of actions is:

  1. Create folder
  2. Create alert

Now these two actions happened within the same 5 minute period, and when the timer job fires it checks "What has been changed the last five minutes" and "Who should be notified". Matching those two you'll get a notification e-mail even if the alert was created after the folders.

Reference: Timer job reference (SharePoint Server 2010)

share|improve this answer
    
Thanks very much Benny, a big help in understanding this behaviour. I would look down the route of 'postponing' the creation of an alert by 5 minutes or more through the user of a bespoke timer job but I have to assume that a user may start uploading documents to this particular list within minutes. I think the filter may be the way for me to go with this. –  DeeMac Feb 18 '13 at 13:16
    
@DeeMac You're welcome! –  Benny MCSA Office365 Feb 18 '13 at 13:18
    
Just to sound real desperate - do you have any idea on my issue with the alert filter please Benny? sharepoint.stackexchange.com/questions/59856/…;‌​er-alert-against-a-list –  DeeMac Feb 18 '13 at 13:18
3  
Bounty awarded. Suppose sometimes it's well worth 150 points just to get a grip on an understanding of SharePoint's 'under the bonnet' concepts. Thanks again. –  DeeMac Feb 18 '13 at 13:27

You can filter folders from alerts, but it's a little tricky. Here's how I've managed to accomplish it.

First, create a custom content type based on the Folder content type (I named it "Managed Folder" in this case). Add that to any lists you want to be affected and make sure it is visible in the "New" button. Remove folder creation from the list in its advanced settings. Now create a view of the library that filters out content type "Managed Folder" (this is where you need the custom content type, using the standard Folder type will make the next part impossible). Now you can set alerts to apply only to items that show up in that specific view. Users can use the "New" button in the library to make "Managed Folders" which don't show up in the view, and therefore don't trigger the alerts.

Protip: Find the GUID of the view using SP Manager or PS or whatever you like, then use that to make a console application that recursively changes the content type of all existing folders to the new custom content type. That way if a folder is deleted or renamed or moved it will also not trigger the alerts.

Protip 2: Have a similar console app iterate through all alerts (or filtered however you like) and change them to be based on that view. This is useful if users are permitted to create their own alerts. I'm sure it could be done automatically with an event receiver too, though I have not done that part myself.

Bonus: Having the folders set to the custom content type allows you to add metadata and gives you much more control over them.

Edit: Here's the detailed explanation/solution for the alert view problem - SPv4 Alert Views

share|improve this answer
1  
+1 for this answer. Really appreciate the time you've taken to write it out. It seems hugely elaborate for such filtering though. The folder content type itself is identifiable but it just seems impossible to filter on it? Did you explore all other avenues first? –  DeeMac Feb 18 '13 at 15:43
    
@DeeMac Yeah believe me, it's that elaborate because there no easier way to do it, but when it's all said and done having control over the folder's metadata is pretty valuable. I learned the hard way that views based on certain default content types (like Folder) cannot be used in an alert, hence creating a cloned custom content type. I almost went mad trying to figure out why only some views showed up as options in alerts. Check out the link I just added to my answer. –  thanby Feb 18 '13 at 16:08
    
Thanks so much Thanby, really appreciate that. I'll have a good read of it. –  DeeMac Feb 18 '13 at 16:22

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.