Hey Community,
I want to replace attachments from annotation entities with a link to a third-party system. The background is that we have developed a solution which automatically exports attached documents to our document management system (DMS). Since storage space in Dynamics CRM is a little pricy and we do not want redundant document storage (CRM and DMS), the idea is to remove the exported documents from CRM and replace them with a reference link to the document inside our DMS.
I want to replace the attachment from inside a plugin and already have tried out some ideas, which include creating a .url file containing the URL to the exported document and replacing the original document with said file. That is also the closest I got to functioning, but I want to achieve a similar behaviour to what CRM is doing by default, which is downloading the attachment when a user clicks on it.
For the past two days, I have been searching the community and other sources but could not find anything that could help me achieve this goal. The closest thing I found was blog posts describing how to delete an attachment from inside a plugin, which only partially fits my scenario.
Is what I am trying to accomplish even possible?
Thanks for any help!