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
DevelopersDevelopers 

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

Hi,

 

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.....

 

Regards,

Phanikumar