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
srm10000srm10000 

Create documents and attachments with Apex

To whom it may concern

 

Does anybody know if it's possible to create documents and attachments with Apex Code?

 

Thanks

 

Stephen

tmatthiesentmatthiesen

Yes:

 

document d = new document();

attachment a = new attachment();