SharePoint Alerts not working correctly


  • I develop on SharePoint 2013 foundation. For some SharePoint list there is immediately created alert for special user. Alert created programmatically. User noticed about list items fields changing through email. So may question when list fields changed different times user receive email only for one change, why? For more information Immediately Alert timer job run after that fields changing. How to configure alert programmatically (C#) in order alert to work for two changes or there is another way?
    2018년 5월 17일 목요일 오전 8:17

모든 응답

  • Hi Gurgen,

    Please create the alert like code snippet below:

      static void Main(string[] args)
             using (SPSite site = new SPSite("http://sp/sites/dev"))
                        using (SPWeb objWeb = site.OpenWeb())
                            objWeb.AllowUnsafeUpdates = true;
                            SPList list = objWeb.Lists["RestDate"];
                            SPUser currentuser = objWeb.CurrentUser;
                            SPAlert newAlert = currentuser.Alerts.Add();
                            newAlert.Title = list.Title;
                            newAlert.AlertType = SPAlertType.List;
                            newAlert.List = list;
                            newAlert.DeliveryChannels = SPAlertDeliveryChannels.Email;
                            newAlert.EventType = SPEventType.Modify;
                            newAlert.AlertFrequency = SPAlertFrequency.Immediate;

    And it will send alert for multiple changes, see the email alert like below:

    Changed Title alert:

    Changed a Date Field Alert:


    Best Regards

    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    2018년 5월 18일 금요일 오전 10:32
  • Hi Jerry,

    My custom alert created by the same code. 
    Did you check changes alerting when "Immediate Alert" timer job run late specially when two changes already done? 
    For me alert run only for one change.


    Best Regards

    2018년 5월 21일 월요일 오전 8:51