function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
pavan.elthepu1.392651269495206E12pavan.elthepu1.392651269495206E12 

Unable to save pdf from Javascript

Here is my requirement:
  1. Have a custom button on EmailAuthor Page - Completed using Chrome extension
  2. On clicking this custom button send custom email - Working Great (Used JavaScript API)
Here is the issue: Whenever I attach files from my computer onto EmailAuthor page, those attachments are not coming in my SOQL query. Example attachment id: xxxxxxx
File is displaying if I browse: https://c.cs66.content.force.com/servlet/servlet.FileDownload?file=xxxxxxx
But if I'm browsing https://c.cs66.content.force.com/xxxxxxx, getting insufficient privileges error.
Also, [SELECT Id, Body from Attachment WHERE Id='xxxxxxx'] returning 0 records.
So, can anyone please help me how to get the body of these attachments?