{"id":6346,"date":"2017-09-08T18:20:43","date_gmt":"2017-09-08T12:50:43","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=6346"},"modified":"2017-09-08T18:20:43","modified_gmt":"2017-09-08T12:50:43","slug":"fixed-the-attachment-cannot-be-saved-either-specify-activityid-or-objecttypecode-objectid-error-while-processing-email-attachment-using-ssis","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2017\/09\/fixed-the-attachment-cannot-be-saved-either-specify-activityid-or-objecttypecode-objectid-error-while-processing-email-attachment-using-ssis\/","title":{"rendered":"Fixed &#8211; &#8216;The attachment cannot be saved. Either specify activityId or ObjectTypeCode &#038; ObjectId&#8217; error while processing Email Attachment using SSIS"},"content":{"rendered":"<p style=\"text-align: justify;\"><strong>Introduction:<\/strong><\/p>\n<p style=\"text-align: justify;\">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.<\/p>\n<p style=\"text-align: justify;\">However, when we did a run for this, we were facing the below error.<\/p>\n<p style=\"text-align: justify;\"><span style=\"color: #ff0000;\"><em><strong>&#8216;The attachment cannot be saved. Either specify activityId or ObjectTypeCode &amp; ObjectId.&#8217;<\/strong><\/em><\/span><\/p>\n<p style=\"text-align: justify;\">We had done the mapping for the Email attachments in the Destination CRM as shown in the screenshot below;<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"aligncenter  wp-image-6347\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/09\/11.png\" alt=\"'The attachment cannot be saved. Either specify activityId or ObjectTypeCode &amp; ObjectId' error while processing Email Attachment using SSIS\" width=\"775\" height=\"290\" \/><\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"aligncenter  wp-image-6348\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/09\/21.png\" alt=\"'The attachment cannot be saved. Either specify activityId or ObjectTypeCode &amp; ObjectId' error while processing Email Attachment using SSIS\" width=\"735\" height=\"427\" \/><\/p>\n<p style=\"text-align: justify;\">After investigating into this error, we found that we need to map either of the below fields.<\/p>\n<p style=\"text-align: justify;\"><strong>ActivityId\u00a0<\/strong>OR\u00a0<strong>ObjectId and ObjectTypeCode<\/strong><\/p>\n<p style=\"text-align: justify;\">So, when we removed the mapping of the fields <em><strong>&#8216;ObjectID&#8217;<\/strong><\/em> and <em><strong>&#8216;ObjectTypeCode&#8217;<\/strong><\/em> from the mapping in the target CRM component, we did not get any error!<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"aligncenter  wp-image-6349\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/09\/3.png\" alt=\"'The attachment cannot be saved. Either specify activityId or ObjectTypeCode &amp; ObjectId' error while processing Email Attachment using SSIS\" width=\"775\" height=\"281\" \/><\/p>\n<p style=\"text-align: justify;\">This time the attachments migrated successfully to the Target CRM.<\/p>\n<p style=\"text-align: justify;\"><img decoding=\"async\" class=\"aligncenter  wp-image-6350\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/09\/4.png\" alt=\"'The attachment cannot be saved. Either specify activityId or ObjectTypeCode &amp; ObjectId' error while processing Email Attachment using SSIS\" width=\"769\" height=\"455\" \/><\/p>\n<p><strong>Email in Source CRM:<\/strong><\/p>\n<p><img decoding=\"async\" class=\"aligncenter  wp-image-6351\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/09\/5.png\" alt=\"'The attachment cannot be saved. Either specify activityId or ObjectTypeCode &amp; ObjectId' error while processing Email Attachment using SSIS\" width=\"750\" height=\"330\" \/><\/p>\n<p><strong>Email in Destination CRM:<\/strong><\/p>\n<p><img decoding=\"async\" class=\"aligncenter  wp-image-6352\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/09\/6.png\" alt=\"'The attachment cannot be saved. Either specify activityId or ObjectTypeCode &amp; ObjectId' error while processing Email Attachment using SSIS\" width=\"792\" height=\"354\" \/><\/p>\n<p><strong>Conclusion:<\/strong><\/p>\n<p style=\"text-align: justify;\">While either migrating or creating an attachment to CRM you need to map either<em><strong> &#8216;ActivityId&#8217;<\/strong> <\/em>Or <em><strong>&#8216;ObjectId&#8217;<\/strong> <\/em>and <em><strong>&#8216;ObjectTypeCode&#8217;.<\/strong><\/em><\/p>\n<p style=\"text-align: justify;\"><a href=\"http:\/\/www.inogic.com\/product\/integrations\/inolink-quickbooks-microsoft-dynamics-crm\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-6353\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2017\/09\/Get-started-with-QuickBooks-and-Dynamics-365-Integration.png\" alt=\"Get started with QuickBooks and Dynamics 365 Integration\" width=\"800\" height=\"200\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. &#8216;The attachment cannot be saved. Either specify activityId or ObjectTypeCode &amp; ObjectId.&#8217;\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2017\/09\/fixed-the-attachment-cannot-be-saved-either-specify-activityid-or-objecttypecode-objectid-error-while-processing-email-attachment-using-ssis\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":6355,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[19,57],"tags":[624,750,1654],"class_list":["post-6346","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dynamics-crm","category-ssis","tag-dynamics-crm-data-migration","tag-error-while-processing-email-attachment-using-ssis","tag-ssis"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/6346","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=6346"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/6346\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/6355"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=6346"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=6346"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=6346"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}