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.
Hello,
I migrate emails attachments in current project.
Here is the list of fields I populate:
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156