web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Deleting attachments from Notes

(0) ShareShare
ReportReport
Posted on by 85

Hi

Is it possible to bulk delete the attachments from Notes without deleting the Notes?

Thanks, 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    Attachments are stored within notes records in the documentbody field. When an attachment is uploaded, few other fields also get set value such as isdocument, mimetype, and filename.

    If you want to delete an attachment from the note, you will have to clear all the related fields as well.

    To delete the attachment you can write your own script or you could use the XrmToolBox plugin - Bulk Data Updater.

    You can download XrmToolBox from this link if don't already have : [View:https://xrmtoolbox.com:750:50]

    0246.ScreenClip-_5B00_218_5D00_.png

    You can use the following Fetch query to query the notes

    <fetch distinct="false" mapping="logical" >
    <entity name="annotation" >
    <attribute name="annotationid" />
    <attribute name="mimetype" />
    <attribute name="filename" />
    <attribute name="documentbody" />
    <attribute name="isdocument" />
    <order attribute="modifiedon" descending="false" />
    </entity>
    </fetch>

    and then clear the fields by adding them as shown below with values cleared

    0246.ScreenClip-_5B00_218_5D00_.png

    Once you setup the above fields to clear values, you can then choose the batch size, if you have loads of notes to delete attachments from

    ScreenClip-_5B00_217_5D00_.png

    If you want to filter the notes, then you can update the FETCH query.

    Hope this helps

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans