+ Start a Discussion

automatically include any attachments sent with an email from SFDC on the activity history record.

Hi All,


Requirement to automatically include any attachments sent with an email from SFDC on the activity history record. 


Can anyone please let me know for opportunity how we can achieve this.



Thanks in advance for help :)))







Hi Shivam , 


Currently this is not possible, Vote for the Idea to be considered for future releases. 






Rahul AgarwalRahul Agarwal


You will have replace the send email button with a custom on click javascript button. Within you javascript call an apex class and create your file there as a document and save it any folder. Class will return the document id which just created and store it in a ver say docId.


var docId;

docId = sforce.apex.execute("className", "methodName",{parameter1:value, parameter2:vaue, .....});


After this redirect the user to standard SendEmail Page.


window.parent.location.href = "/_ui/core/email/author/EmailAuthor?doc_id=" + docId;



Groundwire ConsultingGroundwire Consulting



Attachments aren't stored on emails sent from Salesforce. To be saved with the One option can be to use Apex code for uploading the same in Attachment object of Object and then sending e-mail.email, attachments must be either associated with the email later



For  more detailed information look at the fallowing link



and if you have any more questions  please feel to contact me on support@groundwireconsulting.com

@Rahul,  I want to send auto attachmnet from Opportunity where auto select email template,  

can  you explain your class in detailed to get document id ?
This is not possible in Salesforce standard functionality, Used apex code to achieve same reequiremnt.