Export (0) Print
Expand All

SPAlertCollection.Add method (SPListItem, SPEventType, SPAlertFrequency)

Adds an alert to the collection of alerts for a list item based on the specified event type and time interval. This method overload is deprecated. Use Add(SPListItem, SPEventType, SPAlertFrequency, SPAlertDeliveryChannels) instead.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public Guid Add(
	SPListItem item,
	SPEventType eventType,
	SPAlertFrequency alertFrequency
)

Parameters

item
Type: Microsoft.SharePoint.SPListItem

A Microsoft.SharePoint.SPListItem object that represents the item to which the alert applies.

eventType
Type: Microsoft.SharePoint.SPEventType

AMicrosoft.SharePoint.SPEventTypevalue that specifies the event type for the alert.

alertFrequency
Type: Microsoft.SharePoint.SPAlertFrequency

A Microsoft.SharePoint.SPAlertFrequency value that specifies the frequency for sending an alert.

Return value

Type: System.Guid
The GUID for the new alert.

Caution noteCaution

If you write new applications, avoid using this deprecated overload, which is maintained only for backward compatibility. If you modify existing applications, you are strongly encouraged to remove any dependency on this feature.

This overload behaves identically to Add(SPListItem, SPEventType, SPAlertFrequency, SPAlertDeliveryChannels) if Email is passed as its final parameter.

Show:
© 2014 Microsoft