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
Raghu_CloudRaghu_Cloud 

Static Resource to attach as an Attachment to a Record

Hi All, 

I have a requirement to attach a word document as an attachment to certain records. I started with creating a static resource with the document. Now, I have difficulty to include that static resource as an attachment from my apex code. Is there any other process to meet this requirement or any input for attaching static resource will be helpful. 
Shashi PatowaryShashi Patowary
Hi,

You can consider designing a VF page for file upload using apex tag -
<apex:inputFile />

In this way, you can create an attachment from the uploaded file.

Please let me know if this is helpful.

Regards,
Shashi Patowary
 
Raghu_CloudRaghu_Cloud
Hi Shashi,

Thanks for your reply. I have a word document which is a template and is standard inside salesforce org (as a Static Resource). I need to attach it to certain records based on the record type of the record.