Server side CRM Connection API
pavliks.PortalConnector.Crm.Connection Namespace
The pavliks.PortalConnector.Crm.Connection namespace contains classes that provide connection functionality to the other Portal Connector namespaces.
Classes
The CrmConnectionManager class manages the connection to an instance of Microsoft Dynamics CRM.
The DirectConnection class provides a connection to the server using a connection string.
The EmptyConnection class is used to return an empty connection object in case of unsuccessful connection attempts.
The ServiceConnection class provides a connection to the server using Microsoft Dynamics CRM web services.
Interfaces
Defines high-level classes, properties, and methods for server connections.
Enumerations
The CrmConnectionType enumeration contains values that are used to specify the type of connection is established.
The DynamicsCrmVersion enumeration contains values that are used to specify the version information for the server.
CrmConnectionManager Class
C# Syntax
public class CrmConnectionManager IDisposable
Classes
Gets the connection instance.
Properties
Gets the version of the Dynamics CRM server from the current connection.
Methods
Releases the connection object. (Inherited from IDisposable.)
CrmDirectConnection Class
C# Syntax
public sealed class CrmDirectConnection ICrmConnection
Properties
Gets the connection type of the current connection
Gets the connection instance of CrmConnectionManager
Gets the status of the current connection
Methods
Closes the connection
Connects to CRM server using connection string
Creates new entity record from properties of an entity instance passed as a parameter. Returns Guid of the new record.
Creates a web service LINQ query for an entity specified in the parameter. Returns List representation of the query.
Deletes a record from an entity specified in the logical name parameter by the record id passed as a second parameter.
Releases the connection object. (Inherited from IDisposable.)
Checks if connection is open and the passed parameter is set to true (to dispose) then closes connection. Returns true if connection has been disposed.
Executes a message in the form of a request, and returns a response returned from processing the organization request.
Retrieves a set of columns, or attributes specified in the ColumnSet parameter from an entity specified in the EntityName string parameter by the record id parameter.
Retrieves entity metadata specified in the Entity Filters parameter for an entity specified in the logical name parameter.
Retrieves an EntityCollection collection of records determined by the query parameter.
Updates an existing record based on the passed entity instance that has one or more properties set to be updated in the record.
CrmEmptyConnection Class
C# Syntax
public sealed class CrmEmptyConnection ICrmConnection
Properties
Gets the connection type of the current connection
Gets the connection error
Gets the connection instance of CrmConnectionManager
Gets the status of the current connection
Methods
Closes the connection
Connects to CRM server using connection string
Creates new entity record from properties of an entity instance passed as a parameter. Returns Guid of the new record.
Creates a web service LINQ query for an entity specified in the parameter. Returns List representation of the query.
Deletes a record from an entity specified in the logical name parameter by the record id passed as a second parameter.
Releases the connection object. (Inherited from IDisposable.)
Checks if connection is open and the passed parameter is set to true (to dispose) then closes connection. Returns true if connection has been disposed.
Executes a message in the form of a request, and returns a response returned from processing the organization request.
Retrieves a set of columns, or attributes specified in the ColumnSet parameter from an entity specified in the EntityName string parameter by the record id parameter.
Retrieves entity metadata specified in the Entity Filters parameter for an entity specified in the logical name parameter.
Retrieves an EntityCollection collection of records determined by the query parameter.
Updates an existing record based on the passed entity instance that has one or more properties set to be updated in the record.
CrmServiceConnection Class
C# Syntax
public sealed class CrmServiceConnection ICrmConnection
Properties
Gets the connection type of the current connection
Gets the connection instance of CrmConnectionManager
Gets the status of the current connection
Methods
Closes the connection
Connects to CRM server using connection string
Creates new entity record from properties of an entity instance passed as a parameter. Returns Guid of the new record.
Creates a web service LINQ query for an entity specified in the parameter. Returns List representation of the query.
Deletes a record from an entity specified in the logical name parameter by the record id passed as a second parameter.
Releases the connection object. (Inherited from IDisposable.)
Checks if connection is open and the passed parameter is set to true (to dispose) then closes connection. Returns true if connection has been disposed.
Executes a message in the form of a request, and returns a response returned from processing the organization request.
Retrieves a set of columns, or attributes specified in the ColumnSet parameter from an entity specified in the EntityName string parameter by the record id parameter.
Retrieves entity metadata specified in the Entity Filters parameter for an entity specified in the logical name parameter.
Retrieves an EntityCollection collection of records determined by the query parameter.
Updates an existing record based on the passed entity instance that has one or more properties set to be updated in the record.
ICrmConnection Interface
Defines high-level classes, properties, and methods for server connections.
C# Syntax
public interface ICrmConnection ICrmService IDisposable
Classes
Gets the connection instance of CrmConnectionManager
Properties
Gets the type of the connection
Gets the current status of the connection
Methods
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.)
CrmConnectionType Enumeration
The CrmConnectionType enumeration contains values that are used to specify the type of connection is established.
C# Syntax
public enum CrmConnectionType
Members
Represents the DirectConnection class.
Represnts the ServiceConnection class.
Represents the EmptyConnection class.
DynamicsCrmVersion Enumeration
The DynamicsCrmVersion enumeration contains values that are used to specify the version information for the server.
C# Syntax
public enum DynamicsCrmVersion
Members
Microsoft Dynamics CRM 4.0.0
Microsoft Dynamics CRM 2011
Microsoft Dynamics CRM 2013
Microsoft Dynamics CRM 2015