Dynamics CRM Target

The Dynamics CRM target allows you to insert and update records in Dynamics CRM. To do so the modules uses the official webservices. In the following we’ll learn the configuration-details of this module.

When the CRM-Target is opened the first time, you must select the entity you want to import. When you have done this, you can configure the following tabs.

Import Settings

This tab allows to set the import-behavior. We’ll cover each option of this tab in detail.
CrmTarget_ImportSettings

Import-Mode
Defines in which cases a record will be created and/or updated.

None
Nothing will be done. It is unlikely you’ll set it to this option.
Create
Only new records will be created. No existing records will be updated.
Update
Only existing records will be updated. No new records records will be created.
Create & Update
New records will be created, existing records will be updated. This is the most often used scenario.

If multiple exist
This defines what to do, if multiple records are found in CRM with the specified primary-key.

Do nothing
No updates will be done.
Update all
Updates all found records.

Set state/owner on
Defines in which cases the state or owner will be set.

None
Nothing will be done. It is unlikely you’ll set it to this option.
Create
The state/owner will only be set for newly created records.
Update
The state/owner will only be set for updated records.
Create & Update
The state/owner will be set in any case.

Defining the primary-key
To identify which records needs to be created or updated, we need to specify which attributes makes up the primary key. Only mapped attributes can be used as primary-key. This means you must first switch to the Mapping-tab and do your mappings. When you finished that, select the primary-key attributes and click the Add-button.

Mapping

Just draw a line by drag and drop from the left-side (source-data) to the right-side (target-crm) to specify a mapping.
CrmTarget_AttributeMapping

Picklist-Mappings
When you draw a mapping for a picklist, new options will appear on the right-side. Choose one of the following Mapping-Type options:

Automatic
This uses dirctly the number from the sourcedata to set the picklist-option.
Manual
Allows you to map each source-value to a picklist-option (similar to the attributemaping).

Relations

Allows you to specify, how related entities must be resolved. As with the picklist-mapping there are two mapping-types (automatic and manual). If you choose automatic, then the sourcedata will be directly used (sourcedata must be a GUID).

When selecting manual, the related record will be resolved. Please let me explain how this works before we configure it. To resolve a related record, the value in the source-record needs to match a value in an attribute of the related entity-records. So we need to specify which source-column matches which related-entity attribute. You can resolve related records by multiple source-values as well!

The following example shows the manual-mapping type:

  1. Switch to Relations-tab
  2. Select an attribute you want to relate
    CrmTarget_RelationMapping_Entity
  3. Optional: Select entitytype (i.e for customer select either account or contact) and click create.
  4. Select the Mapping-Type Manual
  5. Do the matching-mapping from the source-column to the related entity target-attribute
    CrmTarget_RelationMapping_Mapping