Contextual Information in an Event Registration

Topic Last Modified: 2006-06-12

Before you read this topic, you should understand Event Registration.

You can store contextual information in custom properties on the Event Registration Items. Information properties can specify event location, a search query needed to notify users of an event, and so on.

Accessing the Event Registration Item

The event registration item cannot be accessed directly from any of the event methods. However, the URL of the event registration item can be retrieved, and the item can then be opened as a Microsoft® ActiveX® Data Objects (ADO) Record object. Retrieving this URL depends on which event method you are using.

For the OnSave Method, OnDelete Method, OnSyncSave Method, and OnSyncDelete Method, the pointer to a IExStoreEventInfo Interface (pEventInfo) input parameter can be cast as an IExStoreEventRegistrationURL Interface. The URL can then be obtained from the EventRegistrationURL Property.

For the OnTimer Method, the URL of the event registration item is passed into the method as a string.

For the OnMDBStartUp Method and the OnMDBShutDown Method, the URL to the event registration item is not passed in. System event methods can access the EventRecord Property, which points to the event registration item. For synchronous and asynchronous event methods, the EventRecord Property points to the item that triggered the event.

To pass custom data from the event registration item to the event sink

  1. Add custom properties at registration to the event registration. Use the Fields.Append method to do this.
  2. Retrieve the custom properties from the event item in the event sink. Use the Fields(property name) method to retrieve the property values.

Note

You can change the properties in the event registration item from within the event sink.

See Also

Other Resources

Setting and Retrieving Custom Properties