I am working on a Dynamics 365 plugin to handle file attachments in Notes (annotation entity) and store them in an external system. The process works as expected when users add attachments via the binder in a Note: I can retrieve the file data from the documentbody attribute of the annotation entity using the IOrganizationService.
However, I am encountering an issue when users add attachments by drag-and-drop directly into the Note body. In this case:
documentbody attribute in the annotation record is empty.notetext attribute contains a link to the file, such as:I do not want to use the API from within the plugin, so I am attempting to retrieve the file directly from the msdyn_richtextfile entity using the parsed GUID from the URL. According to the documentation, the file should be stored as a Base64-encoded value in the msdyn_fileblob attribute of the msdyn_richtextfile entity.
The problem is that when I retrieve the msdyn_richtextfile record using the GUID, the msdyn_fileblob attribute does not contain the file data. Instead, it holds another GUID, and I cannot find documentation or a clear method to resolve this to the actual file content.
I have tried getting both annotation and msdyn_richtextfile with this GUID from msdyn_fileblob but that did not work.
Questions:
- Why is the
msdyn_fileblobattribute of themsdyn_richtextfileentity not containing the Base64-encoded file as documented? - Is there another entity or attribute that I need to query to retrieve the actual file content in this case?
- Has anyone successfully retrieved files added via drag-and-drop in the Note body using the
IOrganizationServicein a plugin without relying on the API?
Any insights or guidance would be greatly appreciated!
Best regards,
Peter

Report
All responses (
Answers (