One issue we’ve run into with two of our Microsoft Dynamics CRM 4.0 Online customers pertains to importing their customizations into a new CRM Online instance. The error you receive when you attempt to import the customizations is “Failure: lead-contact: This attribute map is invalid. A valid attribute map must meet these requirements: - The data type must match. - The length of the target attribute cannot be shorter than the source attribute. - The format should match. - The target attribute must not be used in another mapping. - The source attribute must be visible on the entity form. - The target attribute must be a field a user can enter data into. - Address ID values cannot be mapped.”
To resolve this issue, you can either figure out which of the requirements in the error message are causing the problem, or if you’re in a hurry, you can remove the XML pertaining to mapping leads to contacts and accounts. WARNING: This may break your mappings from leads to contacts and accounts if you’re not careful. This is also an unsupported route to fixing this issue.
To remove the XML pertaining to mapping leads, open the zip file with your exported customizations and then extract the customizations.xml file. Open it in your favorite XML editor and do a search on the text “<EntitySource>lead</EntitySource>”. This will be the first XML element after an “<EntityMap>” element. If “<EntitySource>lead</EntitySource>” is immediately followed by “<EntitySource>contact</EntitySource>”, then you know that this “<EntityMap>” maps leads to contacts. Very carefully delete starting at “<EntityMap>” and ending at the very next “</EntityMap>”. Try the import again. If you get a similar error for accounts instead of contacts, then remove the “<EntityMap>” for lead to account as well.
The import will now succeed, but there import window may become frozen at 100% complete. If this occurs, wait a few minutes, then close the import window and publish all customizations. Test creating a lead, and then creating a contact and account from that lead to make sure nothing is broken.
-Phil Edry