Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Microsoft Dynamics
Data Management
 Creating Data Maps for Data Migrati...
Creating Data Maps for Data Migration
banner art

The data maps are used to map source data that is contained in the comma-separated values (CSV) files to Microsoft Dynamics CRM. You have to map a column in the source file to an appropriate Microsoft Dynamics CRM entity attribute by using column mapping or complex transformation mapping. The data in the unmapped columns is not imported during the data migration operation.

In addition to data mapping described in Creating Data Maps for Import, data migration includes owner mapping, notes and attachments, and complex transformation mapping.

Owner Mapping

Use the owner mapping to map a system user specified in the source file to a user in Microsoft Dynamics CRM. Use the Microsoft Dynamics CRM user logon name.

Notes and Attachments

Mapping for notes and attachments is handled somewhat differently from other entities. The notes and attachments are used to append additional information to an entity instance in Microsoft Dynamics CRM. The notes are stored as text and the attachments are stored as files in the Microsoft Dynamics CRM database.

Note   The attachments are only supported in the offline mode for data migration.

To create a note in Microsoft Dynamics CRM, set the annotation.isdocument property in the annotation (note) entity to false. To create an attachment, set isdocument to true.

Create the following column mapping to differentiate between a note and an attachment:

Set the columnmapping.processcode property to the ImportProcessCode.Internal value of the ImportProcessCode enumeration.

If the source data represents a note, map the text of the note to the annotation.notetext attribute.

If you are working with Salesforce files, they are usually stored on the disk under unique identification numbers. To import an attachment, you have to map a file identification number contained in the source file to the annotation.documentbody attribute. The documentbody stores the contents of the attachment.

The import asynchronous job checks for mappings that have the source attribute name set to "true" and "false" to discover notes and attachments. If it finds an attachment mapping, it looks for the specified files on the disk and uploads the file contents as attachments into Microsoft Dynamics CRM. If a file is not found, an error is returned.

If you do not provide mapping for an annotation (note) entity, the import job generates a default mapping for a note.

Note   The default maximum size of an attachment that is processed on the Microsoft Dynamics CRM server is 5 MB. You can increase the size limit by specifying a new value in the organization.maxuploadfilesize property. However, an attachment size cannot exceed the maximum HTTP request size (the default is 16MB). For the change to take effect, reset Internet Information Services (IIS). To do this, click Start, click Run, type iisreset, and then click OK.

Transformation Mapping

The transformation mapping is used to modify data before migrating it. For example, you might have to split a full name that is contained in the source file into a first name and a last name to match the target attributes for an entity.

Use the transformation mapping and transformation parameter mapping entities to implement the transformation mapping.

The transformed data must be compatible with the Microsoft Dynamics CRM entity attribute types.

The following describes the available transformations.

Concatenation

Concatenates strings, separating them with a delimiter.

Input ParametersDescription
PrefixString that is used as a prefix in the concatenated string.
SuffixString that is used as a suffix in the concatenated string.
DelimiterOne character or combination of characters that separate substrings inside the concatenated string.

The delimiter is not used between the prefix and the substring or between the suffix and the substring.

Do not use the backspace (\b), newline (\n), and return (\r) characters as a delimiter.

<Variable>Array of variable length that contains substrings.

Output ParametersDescription
StringConcatenated string.

Split

Separates a string that includes a delimiter into substrings. There can be up to ten substrings.

Input ParametersDescription
Input StringString that contains one or more substrings separated with the delimiters.
DelimiterOne character or combination of characters that separate substrings inside the string.

Do not use the backspace (\b), newline (\n), and return (\r) characters or empty strings as a delimiter.


Output ParametersDescription
<Variable>Substrings 1 through maximum of 10.

For example, if the input string contains eleven substrings, the output contains ten substrings as shown here.

Input string: a;b;c;d;e;f;g;h;i;j;k

Output:

a
b
c
d
e
f
g
h
i
j;k

Substring

Returns a substring of a specified length, starting at a specified point in the string.

Input ParametersDescription
Input StringString that contains a substring.
Start IndexStarting position of the substring.
LengthLength of substring. If length is a null, returns a complete string from the start index.

Output ParametersDescription
SubstringReturned substring.

Replace

Replaces all occurrences of a specified string with another specified string.

Input ParametersDescription
Input StringString that contains a search string.
Search StringSearch string.

Do not use the backspace (\b), newline (\n), and return (\r) characters as a search string.

Replace StringReplacement string.

Use an empty string to remove a search string.

Do not use the backspace (\b), newline (\n), and return (\r) characters as a replacement string.


 

Output ParametersDescription
ValueModified string.

Assign Value

Replaces all values with a specified value.

Input ParametersDescription
ValueValue that you want to assign.

Output ParametersDescription
ValueReplacement value (same as assigned value).

Note   Date transformations can only be used for correctly formatted dates. For information about how to format dates, see the Microsoft Dynamics CRM online Help.

Add to Date

Adds a specified number of days, months, and years to a date.

Input ParametersDescription
DateDate string that has to be modified.
Year OffsetPositive or negative value that is added to the year component of an input date.
Month OffsetPositive or negative value that is added to the month component of an input date.
Day OffsetPositive or negative value that is added to the day component of an input date.

Output ParametersDescription
New DateNew data string that contains day, month, and year, added in this order.

Adjust Current Date and Set Time

Adds a specified number of days, months, and years to the current date, and sets the specified time. The offsets can only be integer numbers.

Input ParametersDescription
Year OffsetPositive or negative value that is added to the year component of a current date.
Month OffsetPositive or negative value that is added to the month component of a current date.
Day OffsetPositive or negative value that is added to the day component of a current date.
HoursValue that is used to set the hours component of a current date.
MinutesValue that is used to set the minutes component of a current date.
SecondsValue that is used to set the seconds component of a current date.
Day of WeekDay of the week that can be Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or Sunday. The days of the week are represented by whole numbers, starting with decimal 1 for Monday. The values for days of the week are contained in the DayOfWeek enumeration. For more information about this enumeration, see http://msdn2.microsoft.com/en-us/library/system.dayofweek.aspx.

If the calculated current date does not fall on the specified day of the week, it is adjusted to the nearest earlier date that falls on the specified day of the week. The current date is always adjusted to a date in the past, not to a date in the future.

For example, if you specify Wednesday as a day of the week, and the newly calculated date falls on Tuesday, March 9, then the date is adjusted to Wednesday, March 3, and not to Wednesday, March 10.


Output ParametersDescription
New DateNew data string that contains day, month, and year, added in this order.

Advanced Add to Current Date

Adds a specified number of days, months, and years to the current date. You can specify whether offsets are relative to the current date or absolute values. The offsets can only be integer numbers.

For example, if you use an absolute value of 3 for a month offset, the newly calculated month is March. If you set a relative to current date month offset to 3, and the current month is April, the newly calculated month is July.

Input ParametersDescription
Year OffsetPositive or negative value that is added to the year component of a current date or absolute year.
Year Offset ModeSpecifies whether the offset is relative to the current date or absolute value:

The TransformationOffsetMode.Relative value of the TransformationOffsetMode enumeration specifies relative to current date.

The TransformationOffsetMode.Absolute value of the TransformationOffsetMode enumeration specifies absolute value.

Month OffsetPositive or negative value that is added to the month component of a current date or absolute month.
Month Offset ModeSpecifies whether the offset is relative to the current date or absolute value:

The TransformationOffsetMode.Relative value of the TransformationOffsetMode enumeration specifies relative to current date.

The TransformationOffsetMode.Absolute value of the TransformationOffsetMode enumeration specifies absolute value.

Day OffsetPositive or negative value that is added to the day component of a current date or absolute day.
Day Offset ModeSpecifies whether the offset is relative to the current date or absolute value:

The TransformationOffsetMode.Relative value of the TransformationOffsetMode enumeration specifies relative to current date.

The TransformationOffsetMode.Absolute value of the TransformationOffsetMode enumeration specifies absolute value.

HoursValue that is used to set the hours component of a current date.
MinutesValue that is used to set the minutes component of a current date.
SecondsValue that is used to set the seconds component of a current date.

Output ParametersDescription
New DateNew data string that contains day, month, and year, added in this order. First the relative components are added, and then the absolute values are used to form a date.

See Also

Other Resources


© 2008 Microsoft Corporation. All rights reserved.


© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker