CrmServiceClient Members

Provides the low-level interaction and wrapper methods to connect to Microsoft Dynamics CRM and execute actions.

The following tables list the members exposed by the CrmServiceClient type.

Public Constructors

  Name Description
  CrmServiceClient Overloaded.  


Public Properties

  Name Description
public property ConnectedOrgFriendlyName Gets the friendly name of the organization that you are connected to.
public property ConnectedOrgPublishedEndpoints Gets the endpoint collection for the organization you are connected to.
public property ConnectedOrgUniqueName Get the unique name of the organization you are connected to.
public property 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.
public property 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.
public property CrmConnectOrgUriActual Gets the actual URI used to connect to Microsoft Dynamics CRM. This URI could be influenced by user defined variables.
public property IsBatchOperationsAvailable Gets information about the availability of batch operation. If true, batch operations are available.
public property IsReady Gets the service connection status. If true, the service is ready to accept requests.
public property LastCrmError Gets the last error that occurred while attempting to connect to Microsoft Dynamics CRM.
public property LastCrmException Gets the last exception that occurred while attempting to connect to Microsoft Dynamics CRM.
public property OrganizationServiceProxy Gets the native Microsoft Dynamics CRM organization service.


Public Methods

(see also Protected Methods)

  Name Description
public method AddEntityToQueue Route an entity to a public queue.
public method AssignEntityToUser Assign an Entity to the specified user ID
public method CancelSalesOrder Cancel Sales order
public method CloseActivity 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.
public method CloseIncident Closes an Incident request in CRM, this special handling is necessary to support CRM Built In Object.
public method CloseOpportunity This will close an opportunity as either Won or lost in CRM
public method CloseQuote Closes a quote as won or lost, Revise is not supported via this method
public method CloseTroubleTicket Closes a Trouble ticket by ID
public method CreateAnnotation This creates a annotation [note] entry, related to a an existing entityRequired Properties in the fieldListnotetext (string) = Text of the note,subject (string) = this is the title of the note
public method CreateBatchOperationRequest 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.
public method CreateEntityAssociation Associates one Entity to another where an M2M Relationship Exists.
public method CreateMultiEntityAssociation Associates multiple entities of the same time to a single entity
public method CreateNewActivityEntry Creates a new activity against the target entity type
public method CreateNewRecord Uses the dynamic entity patter to create a new entity
public method CreateOrUpdatePickListElement Adds an option to a pick list on an entity.
public method DeleteEntity Deletes an entity from the CRM
public method DeleteEntityAssociation Removes the Association between 2 entity items where an M2M Relationship Exists.
public methodstatic DiscoverOrganizations Overloaded.  
public method Equals  (inherited from Object)
public method ExecuteBatch Begins running the Batch command.
public method ExecuteCrmEntityDeleteRequest Executes a row level delete on a CRM entity ( thread safe ) and returns true or false. Also adds metrics for logging support.
public method ExecuteCrmOrganizationRequest Executes a CRM Organization Request (thread safe) and returns the organization response object. Also adds metrics for logging support.
public method ExecuteWorkflowOnEntity Executes a named workflow on an object.
public method GetActivitiesBy Overloaded.  
public method GetAllAttributesForEntity Returns all attributes on a entity
public method GetAllEntityMetadata Returns a list of entities with basic data from CRM
public method GetBatchById TEMP
public method GetBatchOperationIdRequestByName Returns the batch id for a given batch name.
public method GetBatchRequestAtPosition Returns the organization request at a give position
public method GetDataByKeyFromResultsSet 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.
public method GetEntityAttributeMetadataForAttribute Gets metadata for a specific entity's attribute.
public method GetEntityDataByFetchSearch Overloaded.  
public method GetEntityDataByFetchSearchEC Overloaded.  
public method GetEntityDataById Gets a List of variables from the account based on the list of field specified in the Fields List
public method GetEntityDataByLinkedSearch Overloaded.  
public method GetEntityDataByRollup Overloaded.  
public method GetEntityDataBySearchParams Overloaded.  
public method GetEntityDisplayName Gets an Entity Name by Logical name or Type code.
public method GetEntityDisplayNamePlural Gets an Entity Name by Logical name or Type code.
public method GetEntityFormIdListByType Returns the Form Entity References for a given form type.
public method GetEntityMetadata Returns the Metadata for an entity from CRM, defaults to basic data only.
public method GetEntityName Returns the Entity name for the given Type code
public method GetEntityTypeCode Gets the typecode of an entity by name.
public method GetGlobalOptionSetMetadata Gets a global option set from CRM.
public method GetHashCode  (inherited from Object)
public method GetMyCrmUserId Gets the user ID of the currently logged in user.
public method GetPickListElementFromMetadataEntity Gets a PickList, Status List or StateList from the metadata of an attribute
public method GetType  (inherited from Object)
public method ImportDataMapToCrm Used to upload a data map to the CRM
public method ImportSolutionToCrm Imports a CRM solution to the CRM Server currently connected.*** Note: this is a blocking call and will take time to Import to CRM ***
public method 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.
public method IsSampleDataInstalled Determines if the CRM sample data has been installed
public methodstatic MakeSecureString Makes a secure string
public method PublishEntity Publishes an entity to the production system, used in conjunction with the Metadata services.
public method ReleaseBatchInfoById Release a batch from the stack Once you have completed using a batch, you must release it from the system.
public method ResetLocalMetadataCache This will clear the Metadata cache for either all entities or the specified entity
public method RetrieveBatchResponse  
public method SendSingleEmail Sends an email.
public method SubmitImportRequest Starts an Import request for CRM.Supports a single file per Import request.
public method ToString  (inherited from Object)
public method 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.
public method UpdateEntity Generic update entity
public method UpdateStateAndStatusForEntity Overloaded.  


Protected Methods

  Name Description
protected method Finalize  (inherited from Object)
protected method MemberwiseClone  (inherited from Object)


See Also


CrmServiceClient Class
Microsoft.Xrm.Tooling.Connector Namespace

Other Resources

Build windows client applications using the XRM tools

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