WSS Answers

 
Home » Forum » WSS       Ask a questionRSS Feeds
  Question Asked By: Armando Howell   on Dec 14, 2003 In WSS Category.

 
Question Answered By: Kelly Fowler   on Dec 14, 2003

to my knowledge this can be done only through code, using Object Model

SPWeb web = SPControl.GetContextWeb(Context);

SPUserCollection userCol = web.Users;

foreach(SPUser user  in userCol)
{
user.Alerts.Add(<list/list item>, <action>, <frequency);
}

this code will work only from a web part. if you try to do it from a .net web
application you will get a Code Access Security error. Also you must remember
that the user must have atleast reader privilages on the site in which the alert
needs to be set.

Tagged:      

 

This Question has 4 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Setting user alerts Or get search suggestion and latest updates.