Error Occurs Sending Email Fails When Attaching Multiple Files Which Are Shared with the Record
Last updated 2021-05-26 ·Reference W-8503334 ·Reported By 5 users
Sending an email fails with an error when a user attaches multiple files (8 or more than 8) to an email and when those files are not owned by the user but are shared with the user by access to the record. When sending large number of files with an email, the attachments are turned into Delivery Links instead of being sent as physical attachments. When Content records are generated to links, the process appears to be checking for IsMajorVersion and ends up updating the field too TRUE if it is false. This updates the ContentVersion record. But the user only has access to the file through the record and hence the update operation fails, which blocks the user from sending the email.
1. Create a new org.
2. Create a new Standard User. Ensure that the user has the Content license assigned.
3. Navigate to Setup -> Email Attachments -> select "Default Behavior for Email Attachments" as " Always as links"
4. Navigate to Opportunities and create an Opportunity.
5. Select Details tab and upload a file to Files (or Notes & Attachments RL).
6. Query in Workbench or Developer Console. The IsMajorVersion should be set to false.
7. Click on the File link to view file details.
8. Once on the File Details page, click on The Share button. Click on the chevron next to "Who can access". In the list, set the access against <Opportunity Name> to "Viewer". After this step Standard Users should have "Viewer" access on the file.
9. Login as the Standard User.
10. Navigate to the same Opportunity record.
11. Click on Activity tab -> Email
12. If presented with an option to Send email through Salesforce and to Setup Office 365, choose "Send email through Salesforce".
13. Email form opens.
14. Remove email ids from the BCC field. Type your Salesforce Id in the To field
15. Type a Subject line and few words in the body text.
16. Click on the Attachment (clip) icon at the bottom of the form. Once the File Picker applet loads, Select "Related Files" filter in the left.
17. Select the file uploaded in the earlier steps.
18. Click on Add button and close the File Picker dialog.
19. Click on Send to send the email.
20. An error will show up at the top of the email form.
Attaching a fewer number of files or a single file will not cause the issue.
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.