Announcements
Does anyone know how to pragmatically download attachments from Opportunity notes? I have been able to download and upload to SharePoint any EMBEDDED attachments stored in msdyn_fileblob, but if it is a direct attachment stored in annotations documentbody, it is not in the same file format. I am not familiar with how to convert this into a text/plain fileblob format I can upload to sharepoint.
Working on a script to migrate all notes to SharePoint and update opportunities with hyperlink to document (space savings).
Solutions was following:
$fileblob = [System.Convert]::FromBase64String($documentbody)
$upload = Call-WebAPI -URI "$mgurl/drives/$PDR_RootID/root:/$locationurl/$($fileName):/content" -Method PUT -Accept "text/plain" -Authorization $Token2 -Body $fileblob -ContentType 'text/plain'
Using the content type 'text/plain'.
André Arnaud de Cal...
293,356
Super User 2025 Season 1
Martin Dráb
232,506
Most Valuable Professional
nmaenpaa
101,158
Moderator