Share via


SPEventReceiverDefinition.ContextObjectId Property

Gets or sets the Guid (associated with the ContextType) for the context object.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Property ContextObjectId As Guid
    Get
    Set
'Usage
Dim instance As SPEventReceiverDefinition
Dim value As Guid

value = instance.ContextObjectId

instance.ContextObjectId = value
public Guid ContextObjectId { get; set; }

Property Value

Type: System.Guid
Guid that represents the identifier by which to access the context object.

Remarks

This is the actual SPListItem object, but this property is only used for setting context lookups. For example, the create column action can be retrieved by an id that differs from the id for the create view action, although they are both within the settings context.

See Also

Reference

SPEventReceiverDefinition Class

SPEventReceiverDefinition Members

Microsoft.SharePoint Namespace

SPEventContext