次の方法で共有


IOrganizationService.Execute メソッド

適用対象: CRM 2015 on-prem, CRM Online

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

名前空間: Microsoft.Xrm.Sdk
アセンブリ: Microsoft.Xrm.Sdk (Microsoft.Xrm.Sdk.dll に含まれる)

構文

'宣言
<OperationContractAttribute> _
<FaultContractAttribute(GetType(OrganizationServiceFault))> _
Function Execute ( _
    request As OrganizationRequest _
) As OrganizationResponse
[OperationContractAttribute] 
[FaultContractAttribute(typeof(OrganizationServiceFault))] 
OrganizationResponse Execute (
    OrganizationRequest request
)

パラメーター

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

戻り値

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

詳細情報: 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.

スレッド セーフ

この種類のパブリックな静的 (Visual Basic では Shared) メンバーはスレッド セーフです。インスタンス メンバーがスレッド セーフであることは保証されません。

プラットフォーム

開発プラットフォーム

Windows Vista、Windows Server 2003、および

対象プラットフォーム

Windows Vista、Windows XP

関連項目

参照

IOrganizationService インターフェイス
IOrganizationService のメンバー
Microsoft.Xrm.Sdk 名前空間

他のリソース

Use Messages (Request and Response Classes) with the Execute Method
The Security Model of Dynamics CRM
Privileges by Message
Privileges by Entity
Handle Exceptions in Your Code
Troubleshooting and Error Handling

Send comments about this topic to Microsoft.
© 2014 Microsoft Corporation. All rights reserved.