When you use SSIS Dynamics CRM Destination for the Upsert (Update/Insert) operation, you may get the following error(s) sometimes.
A record that has the attribute values Account Name already exists. The entity key AK_NAME requires that this set of attributes contains unique values. Select unique values and try again.
------ or ------
[Dynamics CRM Destination ] Error: System.Exception: Exception: Cannot insert duplicate key.
You have not mapped the Primary Key column or you have not supplied UpsertKeyField Name in the Properties Grid.
Make sure you mapped at least Primary Key Field or Mapped Alternate Key Field. For Upsert operation you must specify the UpsertKeyField property (This field indicates to CRM, which Column to use as JOIN key for lookup).
Step-1: Create an Alternate key (Required for CRM Upsert Operation)
Step-2: Specify Upsert Key Field in the Mapping
Step-3: Specify UpsertKeyField in the Property, Execute SSIS Package