Fixed – ‘The attachment cannot be saved. Either specify activityId or ObjectTypeCode & ObjectId’ error while processing Email Attachment using SSIS

By | September 8, 2017

Introduction:

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;

'The attachment cannot be saved. Either specify activityId or ObjectTypeCode & ObjectId' error while processing Email Attachment using SSIS

'The attachment cannot be saved. Either specify activityId or ObjectTypeCode & ObjectId' error while processing Email Attachment using SSIS

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!

'The attachment cannot be saved. Either specify activityId or ObjectTypeCode & ObjectId' error while processing Email Attachment using SSIS

This time the attachments migrated successfully to the Target CRM.

'The attachment cannot be saved. Either specify activityId or ObjectTypeCode & ObjectId' error while processing Email Attachment using SSIS

Email in Source CRM:

'The attachment cannot be saved. Either specify activityId or ObjectTypeCode & ObjectId' error while processing Email Attachment using SSIS

Email in Destination CRM:

'The attachment cannot be saved. Either specify activityId or ObjectTypeCode & ObjectId' error while processing Email Attachment using SSIS

Conclusion:

While either migrating or creating an attachment to CRM you need to map either ‘ActivityId’ Or ‘ObjectId’ and ‘ObjectTypeCode’.

Get started with QuickBooks and Dynamics 365 Integration

4 thoughts on “Fixed – ‘The attachment cannot be saved. Either specify activityId or ObjectTypeCode & ObjectId’ error while processing Email Attachment using SSIS

  1. Julius Z

    I followed the same approach in migrating email attachment where I mapped the ActivityId, and ignored ObjectId and ObjectTypeCode. Although the data migration was successful, when I go to the email record in Target the attachment filename is blank.

    Help please!

    1. inogic

      The way you have migrated email attachment is the correct. But make sure that, the attachment which you have migrated it contains data in file or check its file size is greater than 0. The issue/scenario that you have faced it happens when attachment doesn’t contain data in file.

      Hope this helps.

      Thanks!

      1. Rajesh

        I am facing the same issue, the attachment file name is blank after migrating it to CRM. The attachment has data and the file size is around 72700 bytes. Help Please!

        1. inogic

          What does it mean by “the attachment file name is blank after migrating it to CRM”? As per my understanding, you have stated that the attachment you were migrating had a file name but after it was migrated into CRM the same file name appears blank or empty. Please check whether you have mapped filename column/field in CRM Destination component as highlighted in the below screen clip.

          SSIS

          Thanks!

Comments are closed.