CrmServiceClient Class
Applies To: Dynamics CRM 2015
Provides the low-level interaction and wrapper methods to connect to Microsoft Dynamics CRM and execute actions.
Namespace: Microsoft.Xrm.Tooling.Connector
Assembly: Microsoft.Xrm.Tooling.Connector (in Microsoft.Xrm.Tooling.Connector.dll)
Inheritance Hierarchy
System.Object
Microsoft.Xrm.Tooling.Connector.CrmServiceClient
Syntax
public sealed class CrmServiceClient
public ref class CrmServiceClient sealed
[<Sealed>]
type CrmServiceClient = class end
Public NotInheritable Class CrmServiceClient
Constructors
Name | Description | |
---|---|---|
CrmServiceClient(NetworkCredential, AuthenticationType, String, String, String, Boolean, Boolean, OrganizationDetail) | Initializes a new instance of the CrmServiceClient class using the specified network credentials and authentication type as AD or SPLA. |
|
CrmServiceClient(NetworkCredential, String, String, String, Boolean, Boolean, OrganizationDetail) | Initializes a new instance of the CrmServiceClient class using the specified network credentials and Active Directory authentication. |
|
CrmServiceClient(OrganizationServiceProxy) | Initializes a new instance of the CrmServiceClient class using the Organization service proxy provided by the user. |
|
CrmServiceClient(String, SecureString, String, String, Boolean, Boolean, OrganizationDetail, Boolean) | Initializes a new instance of the CrmServiceClient class using the specified network credentials and authentication type as Windows Live or Office 365. |
|
CrmServiceClient(String, SecureString, String, String, String, String, String, Boolean, Boolean, OrganizationDetail) | Initializes a new instance of the CrmServiceClient class using the specified network credentials and claims-based authentication. |
Properties
Name | Description | |
---|---|---|
ConnectedOrgFriendlyName | Gets the friendly name of the organization that you are connected to. |
|
ConnectedOrgPublishedEndpoints | Gets the endpoint collection for the organization you are connected to. |
|
ConnectedOrgUniqueName | Get the unique name of the organization you are connected to. |
|
ConnectedOrgVersion | Gets the version number of the organization you are connected to. If accessed before you are connected to an organization, null or 0.0 is returned. |
|
ConnectionLockObject | Gets the connection lock object that is used to control connection access for various threads. This should be used to lock the connection if you are using the Microsoft Dynamics CRM queries via LINQ. |
|
CrmConnectOrgUriActual | Gets the actual URI used to connect to Microsoft Dynamics CRM. This URI could be influenced by user defined variables. |
|
IsBatchOperationsAvailable | Gets information about the availability of batch operation. If true, batch operations are available. |
|
IsReady | Gets the service connection status. If true, the service is ready to accept requests. |
|
LastCrmError | Gets the last error that occurred while attempting to connect to Microsoft Dynamics CRM. |
|
LastCrmException | Gets the last exception that occurred while attempting to connect to Microsoft Dynamics CRM. |
|
OrganizationServiceProxy | Gets the native Microsoft Dynamics CRM organization service. |
Methods
Name | Description | |
---|---|---|
AddEntityToQueue(Guid, String, String, Guid, Boolean, Guid) | Route an entity to a public queue. |
|
AssignEntityToUser(Guid, String, Guid, Guid) | Assign an Entity to the specified user ID |
|
CancelSalesOrder(Guid, Dictionary<String, CrmDataTypeWrapper>, Int32, Guid) | Cancel Sales order |
|
CloseActivity(String, Guid, String, String, Guid) | Closes the Activity type specified. The Activity Entity type supports fax , letter , and phonecall *Note: This will default to using English names for Status. if you need to use Non-English, you should populate the names for completed for the status and state. |
|
CloseIncident(Guid, Dictionary<String, CrmDataTypeWrapper>, Int32, Guid) | Closes an Incident request in CRM, this special handling is necessary to support CRM Built In Object. |
|
CloseOpportunity(Guid, Dictionary<String, CrmDataTypeWrapper>, Int32, Guid) | This will close an opportunity as either Won or lost in CRM |
|
CloseQuote(Guid, Dictionary<String, CrmDataTypeWrapper>, Int32, Guid) | Closes a quote as won or lost, Revise is not supported via this method |
|
CloseTroubleTicket(Guid, String, String, Guid) | Closes a Trouble ticket by ID |
|
CreateAnnotation(String, Guid, Dictionary<String, CrmDataTypeWrapper>, Guid) | This creates a annotation [note] entry, related to a an existing entity Required Properties in the fieldList notetext (string) = Text of the note, subject (string) = this is the title of the note |
|
CreateBatchOperationRequest(String, Boolean, Boolean) | Create a Batch Request for executing batch operations. This returns an ID that will be used to identify a request as a batch request vs a "normal" request. |
|
CreateEntityAssociation(String, Guid, String, Guid, String, Guid) | Associates one Entity to another where an M2M Relationship Exists. |
|
CreateMultiEntityAssociation(String, Guid, String, List<Guid>, String, Guid, Boolean) | Associates multiple entities of the same time to a single entity |
|
CreateNewActivityEntry(String, String, Guid, String, String, String, Dictionary<String, CrmDataTypeWrapper>, Guid) | Creates a new activity against the target entity type |
|
CreateNewRecord(String, Dictionary<String, CrmDataTypeWrapper>, String, Boolean, Guid) | Uses the dynamic entity patter to create a new entity |
|
CreateOrUpdatePickListElement(String, String, List<LocalizedLabel>, Int32, Boolean) | Adds an option to a pick list on an entity. |
|
DeleteEntity(String, Guid, Guid) | Deletes an entity from the CRM |
|
DeleteEntityAssociation(String, Guid, String, Guid, String, Guid) | Removes the Association between 2 entity items where an M2M Relationship Exists. |
|
DiscoverOrganizations(Uri, Uri, ClientCredentials, ClientCredentials) | Discovers the organizations. |
|
DiscoverOrganizations(Uri, Uri, NetworkCredential) | Discovers the organizations. |
|
Equals(Object) | (Inherited from Object.) |
|
ExecuteBatch(Guid) | Begins running the Batch command. |
|
ExecuteCrmEntityDeleteRequest(String, Guid, String) | Executes a row level delete on a CRM entity ( thread safe ) and returns true or false. Also adds metrics for logging support. |
|
ExecuteCrmOrganizationRequest(OrganizationRequest, String) | Executes a CRM Organization Request (thread safe) and returns the organization response object. Also adds metrics for logging support. |
|
ExecuteWorkflowOnEntity(String, Guid, Guid) | Executes a named workflow on an object. |
|
GetActivitiesBy(String, Guid, List<String>, CrmServiceClient.LogicalSearchOperator, Dictionary<String, String>, Dictionary<String, CrmServiceClient.LogicalSortOrder>, Int32, Int32, String, String, Boolean, Guid) | Returns all Activities Related to a given Entity ID. Only Account, Contact and Opportunity entities are supported. |
|
GetActivitiesBy(String, Guid, List<String>, CrmServiceClient.LogicalSearchOperator, List<CrmServiceClient.CrmSearchFilter>, Dictionary<String, CrmServiceClient.LogicalSortOrder>, Int32, Int32, String, String, Boolean, Guid) | Returns all Activities Related to a given Entity ID. Only Account, Contact and Opportunity entities are supported. |
|
GetAllAttributesForEntity(String) | Returns all attributes on a entity |
|
GetAllEntityMetadata(Boolean, EntityFilters) | Returns a list of entities with basic data from CRM |
|
GetBatchById(Guid) | TEMP |
|
GetBatchOperationIdRequestByName(String) | Returns the batch id for a given batch name. |
|
GetBatchRequestAtPosition(Guid, Int32) | Returns the organization request at a give position |
|
GetDataByKeyFromResultsSet<T>(Dictionary<String, Object>, String) | This function gets data from a Dictionary object, where "string" identifies the field name, and Object contains the data, this method then attempts to cast the result to the Type requested, if it cannot be cast an empty object is returned. |
|
GetEntityAttributeMetadataForAttribute(String, String) | Gets metadata for a specific entity's attribute. |
|
GetEntityDataByFetchSearch(String, Guid) | Searches for data based on a FetchXML query |
|
GetEntityDataByFetchSearch(String, Int32, Int32, String, String, Boolean, Guid) | Searches for data based on a FetchXML query |
|
GetEntityDataByFetchSearchEC(String, Guid) | Searches for data based on a FetchXML query |
|
GetEntityDataByFetchSearchEC(String, Int32, Int32, String, String, Boolean, Guid) | Searches for data based on a FetchXML query |
|
GetEntityDataById(String, Guid, List<String>, Guid) | Gets a List of variables from the account based on the list of field specified in the Fields List |
|
GetEntityDataByLinkedSearch(String, Dictionary<String, String>, String, Dictionary<String, String>, String, String, String, CrmServiceClient.LogicalSearchOperator, List<String>, Guid) | Queries an Object via a M to M Link |
|
GetEntityDataByLinkedSearch(String, List<CrmServiceClient.CrmSearchFilter>, String, List<CrmServiceClient.CrmSearchFilter>, String, String, String, CrmServiceClient.LogicalSearchOperator, List<String>, Guid, Boolean) | Queries an Object via a M to M Link |
|
GetEntityDataByRollup(String, Guid, String, List<String>, CrmServiceClient.LogicalSearchOperator, Dictionary<String, String>, Dictionary<String, CrmServiceClient.LogicalSortOrder>, Guid) | Returns all Activities Related to a given Entity ID. Only Account, Contact and Opportunity entities are supported. |
|
GetEntityDataByRollup(String, Guid, String, List<String>, CrmServiceClient.LogicalSearchOperator, List<CrmServiceClient.CrmSearchFilter>, Dictionary<String, CrmServiceClient.LogicalSortOrder>, Int32, Int32, String, String, Boolean, Guid) | Returns all Activities Related to a given Entity ID. Only Account, Contact and Opportunity entities are supported. |
|
GetEntityDataBySearchParams(String, Dictionary<String, String>, CrmServiceClient.LogicalSearchOperator, List<String>, Guid) | Gets a list of accounts based on the search parameters. |
|
GetEntityDataBySearchParams(String, List<CrmServiceClient.CrmSearchFilter>, CrmServiceClient.LogicalSearchOperator, List<String>, Dictionary<String, CrmServiceClient.LogicalSortOrder>, Int32, Int32, String, String, Boolean, Guid) | Searches for data from an entity based on the search parameters. |
|
GetEntityDataBySearchParams(String, List<CrmServiceClient.CrmSearchFilter>, CrmServiceClient.LogicalSearchOperator, List<String>, Guid) | Gets a list of accounts based on the search parameters. |
|
GetEntityDisplayName(String, Int32) | Gets an Entity Name by Logical name or Type code. |
|
GetEntityDisplayNamePlural(String, Int32) | Gets an Entity Name by Logical name or Type code. |
|
GetEntityFormIdListByType(String, CrmServiceClient.FormTypeId) | Returns the Form Entity References for a given form type. |
|
GetEntityMetadata(String, EntityFilters) | Returns the Metadata for an entity from CRM, defaults to basic data only. |
|
GetEntityName(Int32) | Returns the Entity name for the given Type code |
|
GetEntityTypeCode(String) | Gets the typecode of an entity by name. |
|
GetGlobalOptionSetMetadata(String) | Gets a global option set from CRM. |
|
GetHashCode() | (Inherited from Object.) |
|
GetMyCrmUserId() | Gets the user ID of the currently logged in user. |
|
GetPickListElementFromMetadataEntity(String, String) | Gets a PickList, Status List or StateList from the metadata of an attribute |
|
GetType() | (Inherited from Object.) |
|
ImportDataMapToCrm(String, Boolean, Boolean) | Used to upload a data map to the CRM |
|
ImportSolutionToCrm(String, Guid, Boolean, Boolean, Boolean) | Imports a CRM solution to the CRM Server currently connected. *** Note: this is a blocking call and will take time to Import to CRM *** |
|
InstallSampleDataToCrm() | Request CRM to install sample data shipped with CRM. Note this is process will take a few moments to execute. This method will return once the request has been submitted. |
|
IsSampleDataInstalled() | Determines if the CRM sample data has been installed |
|
MakeSecureString(String) | Makes a secure string |
|
PublishEntity(String) | Publishes an entity to the production system, used in conjunction with the Metadata services. |
|
ReleaseBatchInfoById(Guid) | Release a batch from the stack Once you have completed using a batch, you must release it from the system. |
|
ResetLocalMetadataCache(String) | This will clear the Metadata cache for either all entities or the specified entity |
|
RetrieveBatchResponse(Guid) | ||
SendSingleEmail(Guid, String, Guid) | Sends an email. |
|
SubmitImportRequest(CrmServiceClient.ImportRequest, DateTime) | Starts an Import request for CRM. Supports a single file per Import request. |
|
ToString() | (Inherited from Object.) |
|
UninstallSampleDataFromCrm() | Request CRM to remove sample data shipped with CRM. Note this is process will take a few moments to execute. This method will return once the request has been submitted. |
|
UpdateEntity(String, String, Guid, Dictionary<String, CrmDataTypeWrapper>, String, Boolean, Guid) | Generic update entity |
|
UpdateStateAndStatusForEntity(String, Guid, Int32, Int32, Guid) | Updates the State and Status of the Entity passed in. |
|
UpdateStateAndStatusForEntity(String, Guid, String, String, Guid) | Updates the State and Status of the Entity passed in. |
Thread Safety
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Microsoft.Xrm.Tooling.Connector Namespace
Build Windows client applications using the XRM tools
Return to top
© 2016 Microsoft. All rights reserved. Copyright