This page is a Draft, its content is not complete and might contain errors.
EditCallouts
Callouts allow customization of business logic similar to the CRM 3.0 callouts and CRM 4.0 plugins. Callouts can for example be used to perform validation, automatically perform a cascading operation or update calculated fields.
To implement a callout you must derive from the
CWR.MSCRM.Mobile.Client.BL.CalloutBase class and override those events you want to implement your custom logic for. To execute the callout a file (callout.config) must be placed on the client, this file contains registrations with the entity and event.
EditEvents
The following events are available on entities:
- PreCreate/PostCreate
- PreUpdate/PostUpdate
- PreDelete/PostDelete
- PreRetrieve/PostRetrieve
- PreSetState/PostSetState
- PreAssign/PostAssign
In version 4.1.0.3 the following events have been added
- PreAssociate/PostAssociate
- PreDisassociate/PostDisassociate
The following system events are available
- ApplicationStart
- ApplicationStop
- SyncStart
- SyncComplete
EditEntity Image
The PreCreate, PostCreate, PreUpdate and PostUpdate events receive a DynamicEntity image containing the properties as sent to the Create or Update method of the EntityManager.
EditCallout.config
The callout.config contains the registrations for callouts to specific events (and entities). There can only be a single callout.config file this file must be placed in the root of the client and can be deployed using a
Customization package.
The callout.config file uses the following schema
CalloutConfig.xsdSample callout.config:
<callout.config>
<callout entity="contact" event="PostCreate">
<subscription assembly="MyCallouts.dll" class="MyCallouts.Callout">/>
</callout>
<callout entity="account" event="PostUpdate">
<subscription assembly="MyCallouts.dll" class="MyCallouts.Callout/>
</callout>
</callout.config>