Microsoft Dynamics CRM Object Connector

Overview

Microsoft Dynamics CRM object connector is a reading, writing and deleting Connector provided by UNIFYBroker/Microsoft Dynamics CRM.

This connector encapsulates the information of a single object in Microsoft Dynamics CRM and is typically implemented multiple times to represent multiple tables in a single Microsoft Dynamics CRM instance.

Technical Requirements

The Microsoft Dynamics CRM object connector has no additional requirements following the listed connector prerequisites.

Usage

A Microsoft Dynamics CRM object connector encapsulates the record data available in one object in a Microsoft Dynamics CRM instance.

Reading Yes
Writing Yes
Deleting Yes
Polling Yes

Schema

Fields in a Microsoft Dynamics CRM object connector refer to individual fields in the target object of the same name.

Configuration

Microsoft Dynamics CRM object connector maintains the following configuration:

Image 4201

Name Description
Object Name The name of the Dynamics CRM object (late bound) being targeted. For example: contact.
All Columns Whether the retrieve query should retreive all columns in the query. If not, each field in the schema will be requested and may offer better performance.
Page Size The number of items to be retrieved per page of data from Microsoft Dynamics CRM.
Sort Field The name of the field to be used for sorting of data during imports. Typically the id field should be used, for example: contactid (for the contact). A value must be provided.
Modified Field The name of the field to be used for polling (delta) imports. The field must be a DateTime based field. Configuration for this field is optional.
Related Fields For Microsoft Dynamics CRM to access or make changes to related objects, it must also know the type of objects that are being referenced. This configuration item links between UNIFYBroker fields and the Microsoft Dynamics CRM object type. Each entry should be on a new line.
The format is as follows (without quotes): "fieldName objectType". Where fieldName matches a field in the connector schema; and objectType is the SchemaName of the related object.
Example (without quotes): "Referencing:user_email email".
Many to Many Related Fields To read or make changes to many to many relationships between objects, the connector must know the type of intersection between the two objects that are being referenced. This configuration item links between connector schema fields, Microsoft Dynamics CRM intersection types and the object type of the entity being linked to.
See below for more information, format requirements and examples.
And Filters Whether the configured filters should be AND'd together, as opposed to OR'd.
Filters Allows filters to be added to the query sent to the server. Each entry should be on a new line. Each filter is AND'd if the And Filters setting is set, otherwise they will be OR'd.
The format is as follows (without quotes): "fieldName filterType fieldValue". Where fieldName matches a field in the connector schema; filterType matches the name of a Microsoft.Xrm.Sdk.Query.ConditionOperator; and fieldValue is a string representation of the value to be part of the query.
Example (without quotes): "address2_country Equal United States".
Log Request Whether an additional call should be made to allow for the request to be logged.
Enable Compatibility Enable compatibility mode for the connector. Compatibility mode enables special processing of certain fields when interacting with older version of Dynamics CRM. Compatibility mode should be enabled with Dynamics CRM 2015 on premise or older.
ALERT: The usage of Related Fields or Many to Many Related Fields may impact performance due to additional API calls required by these features. Avoid including unnecessary related fields, especially when interacting with large data sets.

Many to Many Related Fields

The connector configuration Many to Many Related Fields is required for making changes to n:n relationships in Microsoft Dynamics CRM.

Format

Each entry in the Many to Many Related Fields must be entered on a separate line. The format for each entry is:

fieldName intersectionType otherEntityType leftIntersectFieldName rightIntersectFieldName
NameDescription
fieldNameThe connector schema field name for the many to many relationship. The field specified must be one of those provided by the Many to Many schema provider, which have their names prepended with 'Reference' and are of type Multi-Value Guid.
leftIntersectionFieldNameThe field name on the intersection type that corresponds to the id of the connector entity type. The simplest way of obtaining this information is by creating a temporary Microsoft Dynamics CRM connector with the entity type set as the intersection type of interest and performing a schema request.
rightIntersectionFieldNameThe field name on the intersection type that corresponds to the id of the other entity type. The simplest way of obtaining this information is by creating a temporary Microsoft Dynamics CRM connector with the entity type set as the intersection type of interest and performing a schema request.
intersectionTypeThe Microsoft Dynamics CRM intersection type that links the connector entity type to the other entity type. A list of default intersection types can be found here. Alternatively this information can be found within Dynamic CRM at Setting > Customizations > Customize the System, browsing to the correct entity type and viewing the n:n relationships.
otherEntityTypeThe other entity type for which the Many to Many relationship involves. A list of the types for default intersection types can be found here. Note the entity types are interchangeable, so either can be the connector entity type or other entity type. Alternatively this information can be found within Dynamic CRM at Setting > Customizations > Customize the System, browsing to the correct entity type and viewing the n:n relationships.

Examples

 On a connector with entity type set as 'systemuser', to control which teams the user belongs to:

Reference:teammembership_association teammembership team systemuserid teamid

On a connector with entity type set as 'role', to control which users are associated with a role:

Reference:systemuserroles_association systemuserroles systemuser roleid systemuserid

Many to Many Field Import Changes Restriction

For fields which contain many to many relationship values only when a new relationship is added or replaced or another, standard entity field is modified in any way will a Import Changes operation detect and update the relationship field. If a relationship is removed then the Import Changes operation will not update the relationship fields value until a subsequent Import Changes operation detects either a new relationship is added or a standard field value is changed, or a Import All operation is run.

Is this article helpful for you?