Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Answered

activitymimeattachment With Id Does Not Exist

Posted on by 120

Hello colleagues,

I'm writing you because I start to have an strange issue in MS CRM, for some emails when we try to delete them (even as System Admin) we got the below error message. Do you know why I'm having this error? any light in how to fix it?

Thanks in Advance.

s:Clientactivitymimeattachment With Id = 5ecb4000-7814-4f0c-b9fe-35115b5fd4ac Does Not Existaa049339-13f0-459f-8eb6-bf4a95d9c9c5-2147220969activitymimeattachment With Id = 5ecb4000-7814-4f0c-b9fe-35115b5fd4ac Does Not Exist2020-08-05T16:11:39.1202952Zfalseaa049339-13f0-459f-8eb6-bf4a95d9c9c5-2147220969activitymimeattachment With Id = 5ecb4000-7814-4f0c-b9fe-35115b5fd4ac Does Not Exist2020-08-05T16:11:39.1202952Zfalse

  • yleclerc Profile Picture
    yleclerc 1,545 on at
    RE: activitymimeattachment With Id Does Not Exist

    No, we never found a solution.

    I don't think this is related to an update though. We still are able to delete most emails from the system.

    But like @Andrew Butenko mentioned earlier, the emails that we can't delete have been created via another system. In our case, they were synced from Outlook to CRM using the Outlook CRM for Outlook.

  • JMatlon Profile Picture
    JMatlon 15 on at
    RE: activitymimeattachment With Id Does Not Exist

    We're also seeing the same issue (CRM 2016). The Guid referenced has a match in the activitymimeattachment table, so I'm not sure what's going on with this.

    I'm assuming this was introduced with an update.

    Did you ever find a resolution?

  • yleclerc Profile Picture
    yleclerc 1,545 on at
    RE: activitymimeattachment With Id Does Not Exist

    Anyone has other ideas? A user activated the Outlook sync with CRM, and 7,000 emails were sent to CRM. And we can't delete the ones that have attachments.

    I turned off Auditing. Also tried bulk delete job. Nothing works so far.

    Thanks!

  • yleclerc Profile Picture
    yleclerc 1,545 on at
    RE: activitymimeattachment With Id Does Not Exist

    Hi all!

    Turning off the audit for the attachment entity did not work for me. I even tried to turn off Auditing in the whole system. No luck.

    As Andrew mentioned, the emails come from another system (Outlook synchronization).

    Any other ideas?

  • RE: activitymimeattachment With Id Does Not Exist

    Awesome :)

  • Viktorparada Profile Picture
    Viktorparada 120 on at
    RE: activitymimeattachment With Id Does Not Exist

    Hi Miguel, I didn't never think about the Audits, you was right, taking out the Attachment entity from the Audits fix the issue.

    Thank you so much

  • Verified answer
    RE: activitymimeattachment With Id Does Not Exist

    Can you check if you have the auditing enabled for the attachment entity?

    If true, can you try to disable and try to delete again?

  • Viktorparada Profile Picture
    Viktorparada 120 on at
    RE: activitymimeattachment With Id Does Not Exist

    Hi Miguel, first of all thank you for sharing your feedback.

    This approach didn't fix the issue, the result of the execution was zero rown, however I can still see emails with attachments in the system and I'm not able to delete them.

    Do you know what are all the tables where is maintained the field ActivityMimeAttachmentId? I ask you this because looks like the GUID maintained is wrong/missing in one of the tables at least.

    How I know this, well because executing this script I'm able to get the ActivityMimeAttachment record

    SELECT *
    
    FROM [dbo].[ActivityMimeAttachment]
    
    WHERE [ObjectId] = '422077B9-D651-E811-80EB-005056934E24'

    and executing this script I'm able to get the linked attachment

    SELECT *
    
    FROM [dbo].[Attachment]
    
    WHERE [AttachmentId] = '4A2077B9-D651-E811-80EB-005056934E24'

    2020_2D00_08_2D00_06_5F00_11h32_5F00_18.png

  • RE: activitymimeattachment With Id Does Not Exist

    Most probably there are some orphaned records.

    I would delete them from database with:

    DELETE FROM ActivityMimeAttachment WHERE AttachmentId NOT IN (Select AttachmentId FROM Attachment)

    Do a backup first, execute the script and test if everything is ok.

  • Viktorparada Profile Picture
    Viktorparada 120 on at
    RE: activitymimeattachment With Id Does Not Exist

    Hi Andrew, how have you been?

    To be honest I'm quite sure that isn't the case, as far as I remember we migrate our system from 2013 to 2016 4 years ago and until now this issue never happens. This issue start some weeks ago happening to new email as to the old emails in a random way.

    I look into the DB (as our solution is a on premise) and as far as I can go all the linked GUIDs for the related tables are there, I guess I'm missing one but to be honest I don't know where to look more.

    Do you have any idea/suggestion?

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,420 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,672 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans