Export (0) Print
Expand All

IOrganizationService.Execute Method

Applies To: CRM 2015 on-prem, CRM Online

Executes a message in the form of a request, and returns a response.

Namespace: Microsoft.Xrm.Sdk
Assembly: Microsoft.Xrm.Sdk (in Microsoft.Xrm.Sdk.dll)

[OperationContractAttribute] 
[FaultContractAttribute(typeof(OrganizationServiceFault))] 
OrganizationResponse Execute (
	OrganizationRequest request
)

Parameters

request

Type: OrganizationRequest. A request instance that defines the action to be performed.

Return Value

Type: OrganizationResponse
The response from the request. You must cast the return value of this method to the specific instance of the response that corresponds to the Request parameter.

The following example shows how to use the Execute method to assign a queue to a team (early bound). For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface. You can find the complete sample in the sample code package in the folder SampleCode\CS\BusinessDataModel\BusinessManagement\AssignRecordToTeam.cs.

The following example shows how to use the Execute method to assign a queue to a team (late bound). For this sample to work correctly, you must be connected to the server to get an IOrganizationService interface. You can find the complete sample in the sample code package in the folder SampleCode\CS\GeneralProgramming\LateBound\AssignQueueToTeamDE.cs.

Privileges and Access Rights

To execute the message, the caller must have the necessary privileges to the entity type that is specified in the request class. The caller must also have access rights on the specified records in the request class. For more information, see the Request class for the action you want to execute. For example, see AssignRequest.

Notes for Callers

For more information about the exceptions that can be thrown when this method is called, see Handle Exceptions in Your Code.

Method Availability

This method works regardless whether the caller is connected to the server or offline.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Target Platforms

Windows Server 2008,Windows Server 2012,Windows 7

Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft