Connecting to Dynamics 365
Dynamics 365 is a product line of ERP and CRM applications from Microsoft. Skyvia supports the CRM part of Dynamics 365.
Skyvia supports importing data to and from Dynamics 365, exporting Dynamics 365 data to CSV files, replicating Dynamics 365 data to relational databases, and synchronizing Dynamics 365 data with other cloud CRMs and relational databases.
Dynamics 365-Specific Features and Limitations
When performing replication with incremental updates and synchronization, Skyvia removes records deleted in Dynamics 365 in another source only if auditing for such replicated/synchronized entities is enabled in Dynamics 365. 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 Dynamics 365 documentation.
When the not equals operator is used in filters for Dynamics 365, 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 365 behavior.
Dynamics 365 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 365, this field value will be a name of the referenced object type. When loading data to Dynamics 365, 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 365 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 365 Connections
You can create a Dynamics 365 connection in Skyvia by clicking +NEW in the top menu and selecting Connection in the menu on the left.
The Select Connector page opens, which contains all the available connectors — their names and types. You need to find and select Dynamics 365 from available connectors to open Connection Editor page.
On this page, when creating a Dynamics 365 connection, first, you need to specify the name for your connection and, second, the URL that you use to connect to Dynamics 365 (usually it looks like https://companyname.crm.dynamics.com).
Then you need to select the authentication kind to use. Skyvia supports two kinds of authentication for Dynamics 365: User Name & Password and OAuth 2.0.
OAuth 2.0 Authentication
If you don’t want to store your username and password in Skyvia, you can select the OAuth 2.0 authentication method to connect directly to Dynamics 365 with no need to specify your credentials in Skyvia.
To use the OAuth 2.0 authentication, perform the following steps:
- Click the Sign In with Dynamics 365 button.
Pick a Dynamics 365 account if you are already signed in or sign in to Dynamics 365.
Review the list of required permissions, select the Consent on behalf of your organization check box, and click Accept.
User Name & Password Authentication
To use User Name & Password authentication, you need to specify the user name (Windows Live ID) and password for your Windows Live ID account.
Metadata Cache — this parameter determines for how long the cached metadata for the connection are considered valid. By default, Skyvia caches metadata of available objects in cloud sources. Whenever necessary, you can reset metadata cache for a connection manually in the Connection Editor by clicking the Clear now link. Read Metadata Cache for more information. The following values are available for this parameter:
- Disabled — metadata cache is not created; metadata are queried automatically whenever required.
- One Hour — metadata cache expires one hour after the last refresh.
- One Day — metadata cache expires one day after the last refresh.
- One Week — metadata cache expires one week after the last refresh.
- One Month — metadata cache expires one month after the last refresh.
- Infinite — cache never expires/resets 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 365 in one batch. Default value is 500, and usually you don’t need to change this setting. Max possible value, supported by Dynamics 365 is 1000. However, Dynamics 365 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 365, decrease the Batch Size parameter value. You may try, for example, a value 50.
Supported Actions and Actions Specifics
Dynamics 365 connector supports the following actions: