Task Factory Dynamics

Connection Manager

Dynamics CRM Connection Manager

Task Factory Dynamics CRM Connection Manager

OptionDescription
Version

There are five versions of Dynamics CRM that can be utilized with our Dynamics Connection Manager:

  • CRM 4.0
  • CRM 2011
  • CRM 2013
  • CRM 2015
  • CRM 2016

Server TypeBased on the version selected, the server type changes to reflect the available server types supported.

Available CRM 4.0 Server Types :

  • Premise - This is a Dynamics server that is on site.
  • Live - An online account with Dynamics Live. When using this server type you should leave the default URL of crm.dynamics.com or CRM4.dynamics.com.
  • Hosted - A Server instance hosted off site with a third party.
Available CRM 2011 and 2013 - 2016 Server Types:

  • Premise - This is a Dynamics server that is on site.
  • Live - An online account with Dynamics Live. When using this server type you should leave the default URL of crm.dynamics.com or CRM4.dynamics.com.
  • Hosted - A Server instance hosted off site with a third party.
  • Office 365  - An online account with Dynamics Office 365. When using this server the URL should be left as disco.crm.dynamics.com.

Server URLURL or IP address used to connect to the Dynamics CRM server.
User NameAccount used to sign into Dynamics.
PasswordPassword for Dynamics account.
OrganizationThe 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.

Dynamics CRM OData Connection Manager

Connection Settings Tab

Task Factory Dynamics OData Connection Manager Connection Settings

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.

FunctionDescription
Application Id Enter the application Id located in the user's Azure Active Directory > App Registrations >(NameOfApp).
Redirect URIEnter the application's redirect URI configured in the user's Azure Active Directory > App Registrations > (NameOfApp) > Redirect URI's.
Tenant IdEnter 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 nameEnter your organization's name located at https://YOUR_ORGANIZATION.crm.dynamics.com.
UsernameEnter the username for the user logging into the Dynamics CRM instance.
PasswordEnter the password for the user logging into the Dynamics CRM instance.
 Api VersionEnter 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.

Proxy Tab

Task Factory Dynamics OData Connection Manager Proxy

Note:  Proxy use is enabled when a value is added to any of the Proxy fields.

FunctionDescription
Proxy HostEnter the proxy host's IP address.
Proxy PortEnter the proxy host's port number.
Proxy User NameEnter the proxy host's username credential if required. If it's not required, leave blank.
Proxy PasswordEnter the proxy host's password if required. If it's not required, leave blank.
Auth SchemeSelect the authentication scheme used by the host proxy. Users can select from the following options:

  • Basic
  • Digest
  • Proprietary
  • None
  • Ntlm
  • Negotiate

Troubleshooting Tips

Users who are not authorized encounter the following:Task Factory Unauthorized user example

Note:  Currently, the ODATA is missing the following functions and actions for some organization service messages: 

  • GrantAccessRequest
  • RemoveMemberListRequest 
  • ModifyAccessRequest 
  • RemoveItemCampaignRequest
  • ReactivateEntityKeyRequest 
  • RemoveItemCampaignActivityRequest 

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 IconDestination Description
Task Factory Dynamics CRM Destination IconThe 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.

Task Factory Dynamics CRM Destination

FunctionDescription
Connection Using the drop down menu, create or select a connection manager for the Dynamics CRM server.
ActionChoose the desired action :

  • Insert - Insert new rows into the Dynamics Entity.
  • Update - Update rows that already exist in the Dynamics Entity.
  • Delete - Delete existing rows from the Dynamics Entity.
  • Upsert - Upsert is used to insert new rows into the Dynamics Entity, or update rows that already exist.
Detect Duplicate RowsWhen 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 EntityThis field displays all of the available tables in the Dynamics server.
Map Dynamics Destination ColumnsSets up desired mappings.

Upsert Modes

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.

Example

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.

Example

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 IconSource Description
Task Factory Dynamics CRM Source IconThe 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

Task Factory Dynamics CRM Source Choose Columns

FunctionDescription
ConnectionCreate or select a connection manage for the Dynamics CRM server.
Query TypeDetermines where to look for the Dynamics Entity:

  •  Entity - Selects the "standard" entities in Dynamics such as Accounts, Contacts, Opportunities, etc.Views are selected in the Dynamics Entity drop-down.
  • Personal View - Allows users to select custom views. Views are selected in the Dynamics Entity drop-down.
  • System View -  Allows users to select all non-custom views within the Dynamics CRM system.
Dynamics EntityDisplays a list of entities form which the source can read.
Batch SizeThe 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 ChangesToggle 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 VariableIdentifies the variable that stores the (required) change.
Choose ColumnsOnce an entity is selected, the available columns display. Columns can be ignored by unchecking the corresponding box in the Include in Output column.

Filters Tab

Task Factory Dynamics CRM Source Filter

FunctionDescription
FilterFilters can be set so that users can customize the data that is returned.
Preview DataOpens a new window that displays the data based on the entity and conditions (if configured.)
Refresh MetadataUpdates the component with the most current metadata.

To add a filter, complete the following steps:

  1. Select the add icon (+).
  2. Choose the column to be filtered.
  3. Select the parameter (e.g. Begins with, Greater than, Less than, etc.).
  4. Define the value in the <enter a value> box. (Variable replacements can be used with the following syntax:<@Namespace::MyVariableName> .  For example: <@User::Variable>).
  5. Select the word And if Or filter needs to be added.

Dynamics CRM Source Change Tracking

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:

  1. Go to the entity to be tracked.
  2. Go to Customizations > Customize the System.
  3. Select an entity, and under Data Services, select the Change Tracking check box.

Task Factory Dynamics CRM Source Change Tracking

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.

Task Factory Dynamics CRM Source changetype and entityid columns