2

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!

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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