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 have a SharePoint 2007 site which has a document library with several folders. My requirement is that whenever an item is uploaded to a folder, SharePoint should automatically generate an email notification to intended users. I can use workflows but those are not specific to a particular folder. As far as I know, SharePoint does not provide such a functionality out-of-the-box.

Is this possible using SPServices/jQuery? How can I do it?

Thanks in advance!

share|improve this question
add comment

1 Answer 1

you can create an alert at the folder level within the document library through code

 public static void AddFolderAlerts()
 {
            SPSecurity.RunWithElevatedPrivileges(delegate()
            {

                using (SPSite site = new SPSite("site url goes here"))
                {

                    using (SPWeb web = site.OpenWeb())
                    {

                        SPUser user = web.Users["domainname\\username"];
                        SPFolder folder = web.GetFolder("folder url goes here");
                        user.Alerts.Add(folder.Item, SPEventType.All, SPAlertFrequency.Immediate);
                        user.Update();

                    }

                }

            });
}

http://go4answers.webhost4life.com/Example/sharepoint-alerts-list-folders-sub-48730.aspx

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.