If you are looking to remove or delete the attachments from Notes (Annotation entity) in Dynamics 365 CRM / Dataverse (and not delete the Note itself), hopefully this will help!
Disclaimer: I’m not covering ‘how you can save your attachments elsewhere’, I’m only covering how you can delete from Notes given that you have handled your attachments before deleting them.
Here are some points which will help you identify once attachments are included when you create a Note in Dynamics 365 / Dataverse.
Note that these are not in Attachments entity.
- You can have a Flow that is triggered on the create of a Note (annotation) in Dataverse.
So here, the Document is Note is attached on a Note.
And the Trigger of the Dataverse connector in Flow is on the create of a Note
- And when the Note is attached, the triggerOutputs body will show this data that denotes the attachment on the Note.
Here’s how you can clear the attachments from the Notes (by not deleting the actual note). If you want to move to SharePoint, it’s a recommendation, but that’s not something I intend to cover here (Assuming you are doing something with the attachments and then wanting to delete them) –
- Now, in this example, I’m attaching a Note which will be further cleared using the Update step which I’ll show.
- Here’s an update step I have on the same Note which will set the Document Body & Name to null in order to clear the attachment.
- To test this, I had another Flow which is triggered on the update of the Note i.e. the step above.
Once there’s nothing in the Document (documentbody), the filesize will be 0 & isdocument flag to false automatically. Also, setting the Name to Null is important – Else, you’ll still see the attachment on the Note (Just that you can’t open it)
- And when you refresh the Timeline, you’ll see that the attachment is now removed.
Hope this was helpful! Here are some more Dynamics 365 posts which you might be interested in –
- Enable SharePoint Online integration Dynamics 365 | Power Platform Admin Center
- Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
- Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
- Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
- Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
- Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
- Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
- Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
- Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
- Call Azure Function from Dynamics 365 CRM using Webhooks
- Show Ribbon button only on record selection in Dynamics CRM
- Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM