You need to sign in to do that
Don't have an account?
Dan Glaser 4
Emailing Attachments from attachment object
I am working on a client which has the following requirement.
Apex messaging allowed me to add the attachment to the email. There are a couple serious downside to using this method:
I thought about copying the attachment to a document, but I don't want two copies of the attachment. I also thought about deleting the document after I sent the email. I think this could be an issue where I would delete the document before salesforce actually sent the email.
I am using an email template. I created one text and one VFP, mostly to see which worked best for this scenerio.
My question is what can I use to send this email with the attachment under these conditions?
- An email is attached to a case, this can be from a contact, or an company internal email addrees.
- The email contains an attachment, which is saved in attachments and assigned to the case.
- The Page layout for the case uses the related list emails and attachments. both the email and attachment show up on the case.
- The attachment is reviewed, if it doesn't meet the requirements it gets rejected.
- The rejection screen will contain a reject reason and a input fields to change the returning email address. The returning email does not have to be from a contact.
Apex messaging allowed me to add the attachment to the email. There are a couple serious downside to using this method:
- Email address may not come from the contacts.
- Emails are stored in task, not emailmessage. Emailmessage is the related list item in the case. The task is assigned to the contact view.
I thought about copying the attachment to a document, but I don't want two copies of the attachment. I also thought about deleting the document after I sent the email. I think this could be an issue where I would delete the document before salesforce actually sent the email.
I am using an email template. I created one text and one VFP, mostly to see which worked best for this scenerio.
My question is what can I use to send this email with the attachment under these conditions?
Dan Glaser 4
I am not sure if this is the best solution, but I created a rejection document to be used to send as an email attachment. Everytime I have to reject a case attachment the attachment is copied to the rejection document and the email is sent. This seems to work, even with different file types.