Register today for Oracle CloudWorld. October 17th - 20th, Las Vegas

Register now

Hillel Cooperman, Senior VP of User Experience Design, has a message for you on Oracle CloudWorld

Watch now
Read File Contents From Attached File — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Read File Contents From Attached File

Received Response
20
Views
1
Comments
edited Nov 10, 2018 3:51PM in Sales 1 comment

Summary

Read File Contents From Attachments in Groovy

Content

Hi Team, 

We are trying to read the File contents from attachments of Custom object. We are using following the groovy script to read the file contents. 

def attachement_coll=Attachment

while(attachement_coll.hasNext())

{

def attchment=attachement_coll.next();

def  f_content=attchment.FileContents

}

 

With above code we are able read file contents from TEXT file,. However, If file type is EXCEL / PDF content is not properly. 

Please let us know way forward to read file content from if attachment is EXCEL/PDF. 

Regards. 

Madhu

Code Snippet

def attachement_coll=Attachment

while(attachement_coll.hasNext())

{

def attchment=attachement_coll.next();

def  f_content=attchment.FileContents

}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!