CrmService Execute Method
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
In addition to the common methods, you can use another method to execute business logic and other special operations. This method, called the Execute method, uses a message-based approach, and supports a message class hierarchy to group similar operations. This method takes a message request class as a parameter and returns a message response class. Request message class names end with the keyword "Request". Response message class names end with the keyword "Response". For a list of all messages supported by the Execute method, see CrmService Messages.
The Execute method has a request parameter and returns a response as shown below:
[C#] public Response Execute( Request Request );
[Visual Basic .NET] Public Function Execute( ByVal Request As Request ) As Response
For each supported message, there are corresponding subclasses for the Request and Response classes. The following diagram shows a portion of the hierarchy of request and response classes.
There are two types of request classes: generic and entity specific.
Note You must set all fields in the request class. Leaving fields blank or null may have unexpected results.
In This Section
Describes the messages that apply to many entities or no entity.
Describes the messages that are specific to an entity type.
Describes the messages that can return either a strongly typed entity or the dynamic entity class.
Describes the message target classes.
Describes which messages can use optional parameters.
© 2010 Microsoft Corporation. All rights reserved.