I would like Alerts to be created for updates to a changed List item. I would like them to fire off to both the Creator of the event, as well as the users listed in a multi-valued people picker field. I want these to be the OOB Alerts (not custom alerts) to leverage the formatting of the OOB alerts. How can I accomplish this?


You could add alerts to the alertcollection (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spalertcollection_members.aspx) in an evenhandler. However this might introduce some problems as the user needs to be able to add others to alerts unless you elevate the priveleges.

something like this. It's only a head pseudo but I hope it gives inspiration

    foreach user in alertgroup
        spalert newalert = user.alerts.add()
        newalert.alerttype = spalerttype.item
        newalert.item = currentitem
        newalert.properties["eventtypeindex"] = "0"
        newalert.alertfrequency = spalertfrequency.immediate
| improve this answer | |
  • do you think you could provide some more concrete steps? sorry I'm not a dev, but if I have more detail I can write a quick spec up for my dev. So the object is that the people in that field are provided the nice oob alert (not a custom one we write) - – April Drake Jan 8 '14 at 18:18
  • hope the example helps. – Burrhus Jan 11 '14 at 14:52

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.