While performing data migration most of the time, we need to migrate Email and Email Attachments, where we first migrate the Emails and then migrate the Email Attachments.
However, when we did a run for this, we were facing the below error.
‘The attachment cannot be saved. Either specify activityId or ObjectTypeCode & ObjectId.’
We had done the mapping for the Email attachments in the Destination CRM as shown in the screenshot below;
After investigating into this error, we found that we need to map either of the below fields.
ActivityId OR ObjectId and ObjectTypeCode
So, when we removed the mapping of the fields ‘ObjectID’ and ‘ObjectTypeCode’ from the mapping in the target CRM component, we did not get any error!
This time the attachments migrated successfully to the Target CRM.
Email in Source CRM:
Email in Destination CRM:
While either migrating or creating an attachment to CRM you need to map either ‘ActivityId’ Or ‘ObjectId’ and ‘ObjectTypeCode’.