Edit

Share via


IOrganizationService Interface

The IOrganizationService interface exposes methods used to perform web service operations on system and custom tables and on the table definitions (metadata) for your environment.

Client applications

A couple of classes that you can use in your code when creating client applications implement the IOrganizationService interface:

Class Description
CrmServiceClient This is the class you should use when creating .NET Framework client applications.
ServiceClient This is the class you should use when creating .NET Framework or .NET Core client applications.

Plug-ins

When you write plug-ins, there's also an object returned from the IOrganizationServiceFactory.CreateOrganizationService method that implements the IOrganizationService interface but isn't any of the types in the client classes described in the previous section.

IOrganizationService Methods

Each of the classes that implement the IOrganizationService interface might include additional properties and methods, but the IOrganizationService interface has just eight methods.

Method Description
Associate Link two table rows using a table relationship
Create Create a table row.
Delete Delete a table row
Disassociate Remove the link between two table rows using a table relationship
Execute Invoke an operation defined as a message by passing an instance of an OrganizationRequest or a class derived from it.
Retrieve Retrieve an instance of a table row.
RetrieveMultiple Retrieve a collection of table rows that match the criteria set in a query.
Update Change the column values of a table row.

Note

The Organization service exposes only the Execute method. The other methods in the IOrganizationService interface are simply wrappers around the Execute method. These other methods are provided for convenience. You can perform all operations using only the Execute method. More information: Use messages with the SDK for .NET

See also

Use messages with the SDK for .NET
Write a plug-in
Entity class operations using the SDK for .NET