1. Adding your callouts to the Microsoft CRM database

Three tables in Microsoft CRM must be updated to register your callouts:

  • The Entity table contains an EventMask flag that must be set. The platform will evaluate information in the Subscriber and EntityEventSubscribers tables only if this flag does not equal zero.
  • The Subscriber table contains a record that registers the GUID of each class that implements the ICRMCallout interface.
  • The EntityEventSubscribers table contains a record for each entity/event pair you are registering. This record also contains a bit that indicates whether the callout is enabled or disabled.

Note   Modifying the Microsoft CRM database is not supported. However, the procedures in this document have been approved by Microsoft for registering post-callouts. Be careful when you modify these tables because they are also used for Microsoft CRM Integration.

Entity Table

Field Description
EventMask A flag indicating that the platform should evaluate the Subscriber table and the EntityEventSubscribers table for the specified object type.

For a complete list of object type codes, see ObjectType.

Subscriber Table

Field Description
SubscriberId A new GUID that identifies the subscriber.
CLSIDorProgId The ClassId that identifies the handler to be called. Note that ProgId is not supported in version 1.2 of Microsoft CRM.
Name A descriptive name for the handler that is to be called.
Description A description of the handler that is to be called.

EntityEventSubscribers Table

Field Description
EventId An ID that specifies the event. Valid values are:

2 - Post-Create

8 - Post-Update

32 - Post-Delete

EntityId The GUID for an entity in the metabase. This GUID is retrieved by referencing ObjectTypeCode. The following SQL statement can be used to retrieve EntityId:
select entityid from entity where
   objecttypecode = <desired object type code>

For a complete list of object type codes, see ObjectType.

SubscriberId The SubscriberId field from the Subscriber table for the handler that is to be called.
CalloutOrder The order for the callout.
IsEnable A flag that indicates whether the callout is enabled or disabled. Valid values are:

0 – Disabled

1 – Enabled

IsAsyncHandler Reserved for future use. Value must be 0.

© 2005 Microsoft Corporation. All rights reserved.