K
kashif
Hello All,
I am trying to crete alerts using SharePoint V3 API and so far I am
able to create alerts but for some reason I could not figure out how to
set AlertTemplate property on SPAlert object.
Here is my code.
sPAlert = sPUser.Alerts.Add();
sPAlert.AlertType = SPAlertType.List;
sPAlert.AlertTemplate = sPAlertTemplate;
sPAlert.Title = "test alert";
sPAlert.EventType = SPEventType.Delete;
sPAlert.EventTypeBitmask = 2;
sPAlert.AlertFrequency = SPAlertFrequency.Weekly;
sPAlert.User = sPUser;
sPAlert.List = sPList;
sPAlert.Update();
I did try following steps to make it work but after the update it still
shows null for this property. You know if do not set this property then
no body can see the nice looking email.
SPAlertTemplate sPAlertTemplate = new SPAlertTemplate();
sPAlert.AlertTemplate = sPAlertTemplate;
Can some body help me figure out how to set this property.
Thanks
I am trying to crete alerts using SharePoint V3 API and so far I am
able to create alerts but for some reason I could not figure out how to
set AlertTemplate property on SPAlert object.
Here is my code.
sPAlert = sPUser.Alerts.Add();
sPAlert.AlertType = SPAlertType.List;
sPAlert.AlertTemplate = sPAlertTemplate;
sPAlert.Title = "test alert";
sPAlert.EventType = SPEventType.Delete;
sPAlert.EventTypeBitmask = 2;
sPAlert.AlertFrequency = SPAlertFrequency.Weekly;
sPAlert.User = sPUser;
sPAlert.List = sPList;
sPAlert.Update();
I did try following steps to make it work but after the update it still
shows null for this property. You know if do not set this property then
no body can see the nice looking email.
SPAlertTemplate sPAlertTemplate = new SPAlertTemplate();
sPAlert.AlertTemplate = sPAlertTemplate;
Can some body help me figure out how to set this property.
Thanks