In some cases you want a user to automatically create alerts on particular lists, for example an action list. It's very easy to achieve that:
SPWeb thisWeb = SPControl.GetContextWeb(Context);thisWeb.AllowUnsafeUpdates = true; SPList myList = thisWeb.Lists["[list name]"];// in this case a daily alert on all list actionsthisWeb.CurrentUser.Alerts.Add( myList,SPEventType.All,SPAlertFrequency.Daily);thisWeb.CurrentUser.Update();
The same way, alerts can be added for list items.
Remember Me
Powered by: newtelligence dasBlog 1.9.7174.0
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
E-mail
Theme design by Jelle Druyts