Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

activitymimeattachment migration

Posted on by Microsoft Employee

I try to migrate attachments from one CRM system to another so I retrive and upsert activitymimeattachment entity. I read on Internet that in order to make the upsert succesful I need to set some fileds to null: like activityid, attachmentid or objectid. The proposed solution works in case if I use older version of CRM system as target (Microsoft Dynamics 365 Version 1612 (8.2.5.4) (DB 8.2.5.4) on-premises). But in case of newer version (Version 1710 (9.1.0.16238) online) it fails. I tried the following combinations:

1. Upsert "activitymimeattachment" as is - The attachment cannot be saved. Either specify activityId or ObjectTypeCode & ObjectId
2. Remove 'attachmentid' and 'activityid' - An unexpected error occurred (but works for crm 2016)
3. entity["activityid"] = null - The attachment cannot be saved. You must provide either an attachment instance or an attachment ID
4. Remove 'attachmentid' - An unexpected error occurred
5. Remove "attachmentid", "objectid", "objecttypecode" - Attribute: objectid cannot be set to NULL

Please help me to find out how to migrate activitymimeattachment entity.

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: activitymimeattachment migration

    Hello,

    I migrate emails attachments in current project.

    Here is the list of fields I populate:

    7384.Attachment.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans