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
SweetBoxSweetBox 

Email Attachments

How do you store email attachments within SalesForce?  I know for the email with the plain text is stored in a Task related to a Account or Contact. However I do not see how to relate the Task to an item in the stored documents.  Attachments seem to only permit parent IDs to be accounts or contacts but not tasks.
DevAngelDevAngel

Hi Sweetbox,

If you create an email task you can add the attachment to be parented by the contact the email is associated with.  This does not provide a direct link between the task and the attachment though.

One thing you can do to get what you want is to create a custom object that represents an Email task.  Custom objects can parent an attachment and you can create a master detail relationship between the custom object an the contact or lead.  The custom object can be placed on the contact detail page as a related list.  With Summer '04 you can create TextArea fields to contain the body of the email.

I just tried this and it works fine, although there is no connection to the Send Email process in the application ui.

Cheers

SweetBoxSweetBox
Would it be possible to take the ID of the attachment and place it within an URL.  Then the URL could be placed into the body of the Task so the user could click on the URL to get to the attachment.
DevAngelDevAngel

Hi Sweetbox,

Yes and no.  You can create a well formed url that points to an attachement.  No because the body of the task is not "active", in other words, it doesn't render the html and therefore will not create a href.