There are five versions of Dynamics CRM that can be utilized with our Dynamics Connection Manager:
|Server Type||Based on the version selected, the server type changes to reflect the available server types supported.|
Available CRM 4.0 Server Types :
|Server URL||URL or IP address used to connect to the Dynamics CRM server.|
|User Name||Account used to sign into Dynamics.|
|Password||Password for Dynamics account.|
|Organization||The organization is a required field that must match the name of the organization setup in the dynamics crm server. If you do not know the name of the organization, you can select the Get Organizations to get a list of organizations from the server.|
OData Connection Manager
Note: Azure Storage connection manager is available for SQL versions 2012 and higher. Currently, the OData can only target Dynamics CRM instances that use Office 365.
Connection Settings Tab
Additional Information: The following configurable items are located within the user's Azure portal.
Note: A Dynamics app registration needs to be completed to access these items.
|Application Id||Enter the application Id located in the user's Azure Active Directory > App Registrations >(NameOfApp).|
|Redirect URI||Enter the application's redirect URI configured in the user's Azure Active Directory > App Registrations > (NameOfApp) > Redirect URI's.|
|Tenant Id||Enter the application's tenant Id located at http://login.windows.net/YOUR_DOMAIN/.well-known/openid-configuration.|
Alternatively, users can open https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectory
MenuBlade/Properties and navigate to Azure Active Directory > Properties.
Note: The Directory Id is also the Tenant Id.
|Organization name||Enter your organization's name located at https://YOUR_ORGANIZATION.crm.dynamics.com.|
|Username||Enter the username for the user logging into the Dynamics CRM instance.|
|Password||Enter the password for the user logging into the Dynamics CRM instance.|
|Api Version||Enter the Api version.|
The default value is v8.2.
|Timeout (Seconds)||The number of seconds before the connection manager times out trying to connect to the Dynamics CRM instance.|
Note: The default value is zero which is infinite.
Authorize User - Before using the connection manager, users must setup their app in the azure portal. After the connection manager details have been entered, users need to authorize their user account to interact with dynamics by selecting Authorize User. This opens a miniature browser window that automatically navigates to the webpage where the credentials must be entered.
Note: Proxy use is enabled when a value is added to any of the Proxy fields.
|Proxy Host||Enter the proxy host's IP address.|
|Proxy Port||Enter the proxy host's port number.|
|Proxy User Name||Enter the proxy host's username credential if required. If it's not required, leave blank.|
|Proxy Password||Enter the proxy host's password if required. If it's not required, leave blank.|
|Auth Scheme||Select the authentication scheme used by the host proxy. Users can select from the following options:|
Users who are not authorized encounter the following:
Note: Currently, the ODATA is missing the following functions and actions for some organization service messages:
Additional Information: For more information, see the Microsoft Dynamics 365 Web API Limitations MSDN article.
Dynamics CRM Destination
Note: Task Factory currently supports the following versions of Dynamics CRM: 4.0, 2011, 2013, 2015, 2016.
Dynamics CRM Destination
|Destination Icon||Destination Description|
|The Dynamics CRM Destination is used for writing data to a table in a Dynamics CRM server. See the Dynamics CRM Connection Manager or Dynamics OData Connection Manager to learn more about setting up the connection managers.|
|Connection||Using the drop down menu, create or select a connection manager for the Dynamics CRM server.|
|Action||Choose the desired action :|
|Detect Duplicate Rows||When this option is enabled, the destination checks for duplicate rows based on the data duplication rules on the CRM Server. The rows are handled according to the How to handle errors setting.|
|Dynamics Entity||This field displays all of the available tables in the Dynamics server.|
|Map Dynamics Destination Columns||Sets up desired mappings.|
The Upsert mode of Dynamics has two modes, Primary Key Column Mapped, and Primary Key Column Unmapped.
Primary Key Column Mapped
If the primary key from entity is mapped to a column from the source, the destination looks for NULL values in the source data. If the source data for the primary key is NULL, then an insert executes. If the primary key is NOT NULL then an update executes. For an Update to work the primary key column value from the source MUST be the primary key value from the Dynamics entity. For instance, the Account entity primary key column is AccountID. This column must be mapped to be in Primary Key Mapped mode.
If Detect Duplicate Rows is checked an insert is attempted. However, if a Duplicate Data rule on the dynamics server detects a duplicate row, the data in the current row that would have been inserted updates instead.
To give you an example of this let's assume your Account entity on Dynamics has a Duplicate Data rule on the Name column. We have an account named Sentry One in the Dynamics Account entity. If a row with the account name of Sentry One from your source is sent to the server as an insert (because the primary key value is null) then the Dynamics Server rejects the insert but the Dynamics Destination component then takes the current row from the source and updates the row in the Dynamics Account entity. If this behavior is NOT DESIRED then Detect Duplicate Rows should be turned off.
If Detect Duplicate Rows is unchecked and duplicate data is detected on the server the row is rejected and an error is thrown.
Primary Key Column Not Mapped
In this mode, the primary key is not mapped and only the Duplicate Data rules on the Dynamic server are used. For each row from the source an insert is attempted on the server.
Due to the Duplicate Data rule, if Detect Duplicate Rows is checked and a duplicate row is detected on the Dynamics server, the detected duplicate row on the dynamics server updates.
To give you an example of this let's assume your Account entity on Dynamics has a Duplicate Data rule on the Name column. We have an account named Sentry One in the Dynamics Account entity. If a row with the account name of Sentry One from your source is sent to the server and a duplicate row is detected on the Dynamics Server the row is rejected as an insert and treated as update.
If Detect Duplicate Rows is unchecked and a duplicate row is detected on the Dynamics server based on the Duplicate Data rule then an error is thrown.
Additional Information: See the Task Factory Error Row Handling article for more information about this functionality.
Dynamics CRM Source
Dynamics CRM Source
|Source Icon||Source Description|
|The Dynamics CRM Source reads data from the entities in a Microsoft Dynamics Server. See the Dynamics CRM Connection Manager or the Dynamics OData Connection Manager to learn more about setting up the connection manager.|
Task Factory currently supports the following versions of Dynamics CRM:
|• 4.0||• 2011||• 2013|
|• 2015||• 2016|
Choose Columns Tab
|Connection||Create or select a connection manage for the Dynamics CRM server.|
|Query Type||Determines where to look for the Dynamics Entity:|
|Dynamics Entity||Displays a list of entities form which the source can read.|
|Batch Size||The Batch Size field determines the number of rows that are retrieved during a single round trip to the Dynamics server.|
Note: The default value is 500.
|Get Changes||Toggle for users to track changes/updates for synchronization. (Filters cannot be used when selecting this option.) For more information, see Change Tracking .|
Note: Get Changes can only be used when the Entity Query Type is selected.
|Tracking Token Variable||Identifies the variable that stores the (required) change.|
|Choose Columns||Once an entity is selected, the available columns display. Columns can be ignored by unchecking the corresponding box in the Include in Output column.|
|Filter||Filters can be set so that users can customize the data that is returned.|
|Preview Data||Opens a new window that displays the data based on the entity and conditions (if configured.)|
|Refresh Metadata||Updates the component with the most current metadata.|
To add a filter, complete the following steps:
- Select the add icon (+).
- Choose the column to be filtered.
- Select the parameter (e.g. Begins with, Greater than, Less than, etc.).
- Define the value in the <enter a value> box. (Variable replacements can be used with the following syntax: <User::MyVariableName>.)
- Select the word And if Or filter needs to be added.
The Dynamics CRM Source allows organizations to synchronize their data with external data sources. Users can track when a change occurs by selecting the Get Changes toggle. Before using this feature, users must first enable the feature.
To enable the feature, complete the following steps:
- Go to the entity to be tracked.
- Go to Customizations > Customize the System.
- Select an entity, and under Data Services, select the Change Tracking check box.
Note: Before using this feature, please note the following:
- Change Tracking is an entity-level setting that must be enabled before using. This must be enabled for each entity the users wish to track changes.
- A change token is also required for each individual entity. (For example: the Accounts entity token is different than the Contacts token.)
- Lookup field properties are not returned.
- The data is returned in their current status. The pre-change status is not returned.
- Users accounts must be granted the organization level read privileges for each tracked entity.
Additional Information: For more information on enabling your Dynamics CRM instance, please see the Use change tracking to synchronize data with external systems MSDN article.
Note: The changetype and entityid columns are added to the end of the output when the Get Changes option is selected.