Export (0) Print
Expand All

Configuration File Reference

CRM 1.2
banner art

The callout Configuration file is used to register your callouts. The provided schema can be used to validate your configuration file.

Attributes

version

Optional. Specifies the version number of Microsoft CRM. It should always be 3.0.

Elements

Name Description
Callout Optional. This element contains the information necessary to register the callout component.

The xmlns attribute in the root element callout.config is required.

This element has the following attributes:

entity – The schema name of the entity that the callout is registered for. The entity name must be specified in all lowercase letters.

event – The name of the event type.

Valid Values:

  • PreCreate
    PostCreate
    PreUpdate
    PostUpdate
    PreDelete
    PostDelete
    PreAssign
    PostAssign
    PreSetState
    PostSetState
    PreMerge
    PostMerge
    PreSend
    PostDeliver
subscription Optional. This element contains the information necessary to execute the callout component.

This element has the following attributes:

assembly – Required. The name of the DLL that contains the callout component.

class – Required. The class name of the callout component.

onerror – Optional. Specifies what the platform should do when an unhandled exception is passed from a callout back to the platform. This attribute can be used for both pre and post callout components. For more information, see System Error Handling. For other non-exception error handling options in pre-callouts, see PreCalloutReturnValue.

Valid values:

"ignore" or "abort"

timeout – Optional. Specifies the number of seconds that the callout component can execute before it is considered in an error state. The time out applies to a single method invocation of a given entity and event. The default value is 60, and the maximum value is 600.

Prevalue Optional. Contains the schema name of the attribute that should be passed to the callout component. This will be the value of the attribute prior to any processing by pre-callouts or the system method. Only post-callouts use this element. See Remarks.
Postvalue Optional. Contains the schema name of the attribute that should be passed to the callout component. This will be the value of the attribute after the system method has been executed. Only post-callouts use this element. See Remarks.

Remarks

You can use @all as the value for the prevalue or postvalue. This causes all non-null attributes to be returned in the pre-image or post-image attribute set. Any additional attributes specified in the same subscription for the same image (pre or post) are ignored. As shown in the following attribute subscription, the 'name' attribute is ignored because it is already included.

<prevalue>@all</prevalue>
<prevalue>name</prevalue>

Example

The following XML shows a sample configuration file for various callout types.

<callout.config version="1.0">
   <callout entity="account" event="PreCreate">
      <subscription assembly="CalloutAssembly.dll"
                    class="MyCallouts.PreCreateAccount"></subscription>
   </callout>
   <callout entity="account" event="PreSetState">
      <subscription assembly="CalloutAssembly.dll" onerror="abort"
                    class="MyCallouts.PreSetStateAccount"></subscription>
   </callout>
   <callout entity="account" event="PostCreate">
      <subscription assembly="CalloutAssembly.dll" onerror="ignore"
                    class="MyCallouts.PostCreateAccount">
         <prevalue>name</prevalue>
         <postvalue>name</postvalue>
      </subscription>
   </callout>
   <callout entity="appointment" event="PostUpdate">
      <subscription assembly="CalloutAssembly.dll"
                    class="MyCallouts.PostCreateApt">
         <prevalue>subject</prevalue>
         <postvalue>subject</postvalue>
      </subscription>
   </callout>
   <callout entity="invoice" event="PostAssign">
      <subscription assembly="CalloutAssembly.dll"
                    class="MyCallouts.PostAssignInvoice">
         <prevalue>billto_country</prevalue>
         <postvalue>billto_country</postvalue>
         <prevalue>shipto_line2</prevalue>
         <postvalue>shipto_line2</postvalue>
         <prevalue>billto_city</prevalue>
         <postvalue>billto_city</postvalue>
         <prevalue>shipto_line1</prevalue>
         <postvalue>shipto_line1</postvalue>
      </subscription>
   </callout>
</callout.config>

© 2007 Microsoft Corporation. All rights reserved.


Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft