EventReceiver Element (DeploymentManifest)
Applies to: SharePoint 2016 | SharePoint Foundation 2013 | SharePoint Online | SharePoint Server 2013
Represents a SharePoint event receiver object instance (SPEventReceiverDefinition). Depending on the event receiver collection specified, the event receiver can listen for events on SPFile, SPList, SPListItem, or SPWeb objects.
Definition
DECLARATION
<xs:element name="EventReceiver"
type="SPEventReceiverDefinition"
minOccurs="0" maxOccurs="unbounded"
/>
USAGE
<EventReceivers>
<EventReceiver
Id="Guid"
Name="xs:string"
WebId="Guid"
HostId="Guid"
HostType="SPEventHostType"
Type="SPEventReceiverType"
SequenceNumber="xs:int"
Assembly="xs:string"
Class="xs:string"
Data="xs:string"
Filter="xs:string"
Credential="xs:int"
ItemId="xs:int"
/>
</EventReceivers>
Type
Elements and attributes
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute | Type | Description |
---|---|---|
ID |
Guid Simple Type (DeploymentManifest) |
Required. Unique identifier of the event receiver definition. |
Name |
xs:string |
Required. Name of the event receiver. |
WebId |
Guid Simple Type (DeploymentManifest) |
Required. Unique identifier of the site in which the event receiver is registered. |
HostId |
Guid Simple Type (DeploymentManifest) |
Required. Unique identifier of the object that is hosting the event. |
HostType |
SPEventHostType Simple Type (DeploymentManifest) |
Required. Type of object that is hosting the event. The host type must be an enumeration value defined in the SPEventHostType simple type. |
Type |
SPEventReceiverType Simple Type (DeploymentManifest) |
Required. Type of event for the event receiver. The event receiver type must be an enumeration value defined in the SPEventReceiverType simple type. |
SequenceNumber |
xs:int |
Required. Integer representing the relative order in a sequence of events. |
Assembly |
xs:string |
Required. Strong name representing the assembly that is the event receiver. |
Class |
xs:string |
Required. The class that is the event receiver. |
Data |
xs:string |
Optional. Data that is associated with the event receiver. |
Filter |
xs:string |
Optional. |
Credential |
xs:int |
Optional. |
ItemId |
xs:int |
Optional. |
Child elements
None
Parent elements
- EventReceivers Element (DeploymentManifest - SPFile)
- EventReceivers Element (DeploymentManifest - SPList)
- EventReceivers Element (DeploymentManifest - SPListItem)
- EventReceivers Element (DeploymentManifest - SPWeb)