hasAttachment is set to FALSE if EmailMessage has Attachment and ContentDocument and the Attachment is deleted
Last updated 2018-06-09 ·Reference W-4834616 ·Reported By 1 users
hasAttachment is set to FALSE if EmailMessage has Attachment and ContentDocument and the Attachment is deleted.
1. Login as System Admin in Classic
2. Create a new Email Template:
Folder: any folder
Email Template Name: attachment test
Available For Use: Checked
Template Unique Name: attachment_test
Encoding: General US & Western Europe (ISO-8859-1, ISO-LATIN-1)
HTML Body: none
Text Body: none
3. Add an attachment to the Email Template
4. Create a Case
5. Add the following to the Case page layout:
- Send Email quick action (on the Salesforce Mobile and Lightning Experience Actions section)
- Files related list
6. Upload a file using the Files related list
7. Switch to Lightning
8. Navigate to the Case
9. Select the Email quick action
10. Click on the paper clip icon to add an attachment
11. Select the File you uploaded earlier to the case
12. Click on the inset template icon
13. Select the template you created earlier
14. Click Send
15. Click View Email on the post that was created in the feed
16. Click View All under the Attachments related list (may need to add it to the page layout)
17. Click delete next to one of the the attachments
18. Run the following query in the developer console after replacing the id with the Id of your EmailMessage:
SELECT hasAttachment FROM EmailMessage WHERE Id='02s3600000KzpaRAAR'
- hasAttachment is FALSE
- hasAttachment is TRUE
No workarounds at this time.
Reported By (1)
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.