Invalid characters – Migrating Salesforce Full Export data file to CRM


When using the Salesforce Full Export ZIP file to migrate data from Salesforce to CRM, you can experience this error message:

clip_image002

 

Analyzing it in a platform trace to see what is behind this error message, you would see this exception:

Crm Exception: Message: The field ‘content’ contains one or more invalid characters., ErrorCode: -2147220872

 

Usually, this is most likely occurring due to ASCII or ESC characters in one or more exported files.

These characters could appear for example, when the information is copied from a website, and sometimes other applications.

Typically, the users do these operations, when they have to fill long text fields (like address fields).

In order to identify the problematic import files, you can divide them in multiple zip files until we identify the problematic (or more than one) file.

Identified the file, you can open it look for columns with a lot of keyed text.

 

Example:

The contacts file, where you can find a column called MailingStreet with a lot of keyed text.

Suspecting of this column, you can remove it from the file and we try to import it as a single import file.

If you do not experience the same error message, we know that the invalid characters were in the removed column.

So, considering that usually these export files contain a considerable number of records, to resolve this issue, you can use the clean function from Excel:

 

Using our contacts file example:

1. Insert a new column to the right of MailingStreet and name it MailingStreet2

2. In MailingStreet2 line 2, type =clean(N2)

Note:

N2 refers to column N (original MailingStreet) and 2 for line 2

1. Copy this field, then paste in the rest of the MailingStreet2 column

2. Copy all of column MailingStreet2 and Right click on Column, and choose Paste Special – values only

3. Remove column MailingStreet and rename column MailingStreet2 to MailingStreet

 

Once above done, you should be able to perform the import of the Salesforce Full Export ZIP to CRM without the invalid character exception.

 

Best Regards

Dynamics CRM Team


Comments (0)

Skip to main content