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
Zachariah RosenbergZachariah Rosenberg 

Accessing Documents in Document sObject from Apex


I'm trying to access a csv document in my Document sObject via apex (in order to parse the csv). I know how to parse CSV one I get the data (there are many articles on that part), but I'm not sure how to grab the document from the documents sObject in the first place!

How do I reference the CSV document (in sObject Document) from Apex?

I did see that a URL is returned from the following query:
​SELECT body From Document WHERE name = 'myCSV'
That returns something like:
Do I need to point the parser to that address?

Thank you!
Hi ,
I have also same requirement ,if you have any sample code please share with me.
Advance thanks for your help.

Thanks you.