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

Hello,

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:
/services/data/v32.0/sobjects/Document/00000UptFER/Body
Do I need to point the parser to that address?



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

Thanks you.