+ Start a Discussion

How to attach files for document object by using apex code?



Can any one tell me that how to attach file while creating document by using apex controller code?


I need to automate the process of replacing the document daily wise. Instead of that, we decided to make this as automated process by using E-mail services.


I am able to create the record under document. But, i could not able to attach the file which is available in the email attachment.


Please help me in this how to upload that email attachment for the document record.


Thanks in advance.....