Connecting to Dynamics CRM
Dynamics CRM is a widely used cloud CRM from Microsoft focused on Sales, Marketing, and Service (help desk) sectors. Skyvia supports importing data to and from Dynamics CRM, exporting Dynamics CRM data to CSV files, replicating Dynamics CRM data to relational databases, and synchronizing Dynamics CRM data with other cloud CRMs and relational databases.
Dynamics CRM-Specific Features and Limitations
When performing replication with incremental updates and synchronization, Skyvia removes records deleted in Dynamics CRM in another source only if auditing for such replicated/synchronized entities is enabled in Dynamics CRM. To start auditing, click Settings in the Dynamics 365 Navigation Pane. Then under System, click Auditing. In the Audit area, click Global Audit Settings. After this, in the System Settings dialog box, click the Auditing tab. Then select the Start Auditing check box. For more information about Dynamics 365 auditing, check the CRM Book or Dynamics 365 documentation.
When the not equals operator is used in filters for Dynamics CRM, records with an empty (null) value in the compared field are also returned. This behavior is different from the behavior of this operator for database, but this is the normal Dynamics CRM behavior.
Dynamics CRM object can have a reference field that can reference different object types. For example, the Contact object has the parentcustomerid field, which can reference another contact object or an account object. For such fields, Skyvia displays an additional field with the name of the reference field with suffix ‘$type’ added. For the parentcustomerid field it would be parentcustomerid$type. When loading/exporting data from Dynamics CRM, this field value will be a name of the referenced object type. When loading data to Dynamics CRM, this field determines the type of the referenced object. If the reference field is a required field, this virtual field is also required.
Note that Skyvia does not support such polymorphic relations between objects. It means that when you export an object, the fields of related objects that are referenced by such fields cannot be added to export. And you cannot add related objects that are referenced by such a field when performing one-to-many import or synchronization.
Additionally there is a limitation on restoring such relations from Backup. Skyvia can correctly restore such relations only when the reference field is not required and is updatable.
When backing up the Dynamics CRM connections object, you need to pay attention to the following: when creating a record in the connections object, two records for both directions are actually created. This means that when records are restored from backup, duplicates may be created. In order to avoid creating duplicates when restoring connections, restore only the records with IsMaster=True. Actually, you may back up only the records with IsMaster=True for this table. For this, when creating a backup package, after selecting the connections table, click the edit link and specify the corresponding filter condition.
Dynamics CRM Connections
To connect to Microsoft Dynamics CRM, you need to specify the URL to connect, user name (Windows Live ID), and password for your Windows Live ID account.
You need to specify the following parameters for a Dynamics CRM connection:
- URL — url that you use to connect to Dynamics CRM. Usually it looks like: https://companyname.crm.dynamics.com
- Username — your Windows Live ID.
- Password — password for your Windows Live ID account.
Metadata Cache — this parameter determines how often the cached metadata are updated. By default, Skyvia caches metadata of available objects in cloud sources. When creating a connection, you can configure how often cache is refreshed or, when the connection already exists, you can reset it manually on the Connection Editor page by clicking the Clear Cache button. The following values are available for this setting:
- Disabled — metadata cache is not created; metadata are queried automatically whenever the connection is opened.
- One Hour — metadata cache expires one hour after the last refresh; it is refreshed when the connection is opened again.
- One Day — metadata cache expires one day after the last refresh; it is refreshed when the connection is opened again.
- One Week — metadata cache expires one week after the last refresh; it is refreshed when the connection is opened again.
- One Month — metadata cache expires one month after the last refresh; it is refreshed when the connection is opened again.
- Infinite — cache is never reset automatically. Default value.
If necessary, you may click Advanced Settings and set additional connection parameters:
- Batch Size — this parameter specifies the max number of records to send to Dynamics CRM in one batch. Default value is 500, and usually you don’t need to change this setting. Max possible value, supported by Dynamics CRM is 1000. However, Dynamics CRM may need time to process records depending on the number of fields in a record, triggers, etc. It can be configured to timeout after the specified period of time. In this case the connection may freeze and package execution may fail after it. If you experience timeout errors when loading data to Dynamics CRM, decrease the Batch Size parameter value. You may try, for example, a value 50.