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
anukarthi_nimmalaanukarthi_nimmala 

regarding reading values from the documents file

i want to  read from a file, then have to upload into a Document, use Apex SOQL to fetch the Document and Document body, then use Document.getBody or something like that to get the body as a long string and then insert the  column values as fields in to custom object.how could i do this.Any sample code will be help-ful

Ispita_NavatarIspita_Navatar

The sequence of things you want to do is bit unclear , can you please clarify that what I am assuming is correct?

1.You want to read a file on the local system (This one cannot be done until the document is uploaded)

2. then Upload it

3. Use SOQL to fetch documents

2 and 3 are doable.

anukarthi_nimmalaanukarthi_nimmala

 Hi,

 

You are right and then i need to fetch the documents columns  and insert  in to the object as object fields.can you guide me the approach to achieve  it.If Any code will be helpful